Structureswift-algorithms 1.2.1Algorithms
Iterator
Compacted.swift:25struct Iterator
struct Iterator
import Algorithms
Swift Algorithms is an open-source package of sequence and collection algorithms, along with their related types.
struct CompactedSequence<Base, Element> where Base : Sequence, Base.Element == Element?
A Sequence
that iterates over every non-nil element from the original Sequence
.
func makeIterator() -> Iterator
protocol IteratorProtocol<Element>
A type that supplies the values of a sequence one at a time.
mutating func next() -> Element?