Instance Methodswift 6.0.3Swift
distance(from:to:)
func distance(from start: LazySequence<Base>.Index, to end: LazySequence<Base>.Index) -> Int
func distance(from start: LazySequence<Base>.Index, to end: LazySequence<Base>.Index) -> Int
ss12LazySequenceVsSlRzrlE8distance4from2toSi5IndexQz_AGtF
What are these?92LZM
where Base:Collection
import Swift
@frozen struct LazySequence<Base> where Base : Sequence
A sequence containing the same elements as a Base
sequence, but on which some operations such as map
and filter
are implemented lazily.
@frozen struct Int
A signed integer value type.
protocol Collection<Element> : Sequence
A sequence whose elements can be traversed multiple times, nondestructively, and accessed by an indexed subscript.
var count: Int { get }
Returns the number of elements.
var endIndex: LazySequence<Base>.Index { get }
The collection’s “past the end” position—that is, the position one greater than the last valid subscript argument.
var indices: LazySequence<Base>.Indices { get }
var isEmpty: Bool { get }
A Boolean value indicating whether the collection is empty.
var startIndex: LazySequence<Base>.Index { get }
The position of the first element in a non-empty collection.
subscript(position: LazySequence<Base>.Index) -> LazySequence<Base>.Element { get }
Accesses the element at position
.
func index(_ i: LazySequence<Base>.Index, offsetBy n: Int) -> LazySequence<Base>.Index
func index(_ i: LazySequence<Base>.Index, offsetBy n: Int, limitedBy limit: LazySequence<Base>.Index) -> LazySequence<Base>.Index?
func index(after i: LazySequence<Base>.Index) -> LazySequence<Base>.Index
typealias Index = Base.Index
A type that represents a valid position in the collection.
typealias Indices = Base.Indices
typealias SubSequence = Slice<LazySequence<Base>>