Instance Methodswift-algorithms 1.2.1Algorithms
index(before:)
Indexed.swift:78func index(before i: Base.Index) -> Base.Index
func index(before i: Base.Index) -> Base.Index
s10Algorithms17IndexedCollectionVAASKRzrlE5index6before5IndexQzAG_tF
What are these?2H0B6
where Base:BidirectionalCollection
import Algorithms
Swift Algorithms is an open-source package of sequence and collection algorithms, along with their related types.
struct IndexedCollection<Base> where Base : Collection
A collection wrapper that iterates over the indices and elements of a collection together.
associatedtype Index : Comparable where Self.Index == Self.Indices.Element, Self.Indices.Element == Self.Indices.Index, Self.Indices.Index == Self.SubSequence.Index
A type that represents a position in the collection.
protocol BidirectionalCollection<Element> : Collection where Self.Indices : BidirectionalCollection, Self.SubSequence : BidirectionalCollection
A collection that supports backward as well as forward traversal.