Instance Methodswift-algorithms 1.2.1Algorithms
distance(from:to:)
Intersperse.swift:154func distance(from start: Index, to end: Index) -> Int
func distance(from start: Index, to end: Index) -> Int
s10Algorithms20InterspersedSequenceVAASlRzrlE8distance4from2toSiAcASlRzrlE5IndexVyx_G_AItF
What are these?5V0FS
where Base:Collection
import Algorithms
Swift Algorithms is an open-source package of sequence and collection algorithms, along with their related types.
struct InterspersedSequence<Base> where Base : Sequence
A sequence that presents the elements of a base sequence of elements with a separator between each of those elements.
struct Index
A position in an InterspersedSequence
instance.
@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 endIndex: Index { get }
var startIndex: Index { get }
subscript(position: Index) -> Element { get }
func index(_ index: Index, offsetBy distance: Int) -> Index
func index(_ index: Index, offsetBy distance: Int, limitedBy limit: Index) -> Index?
func index(after i: Index) -> Index