PartialSourceLazySplitSequence
public struct PartialSourceLazySplitSequence <Base: Collection>: IteratorProtocol, LazySequenceProtocol where
Base.Element: Equatable,
Base.SubSequence: RangeReplaceableCollection
A sequence from splitting a series of Collections lazily, as if they were one Collection.
-
Creates a lazy sequence by splitting a series of collections repeatedly, as if they were one collection.
Declaration
Swift
public init(_ bases: @escaping () -> Base?, separator: Base.Element)Parameters
basesA function which returns the next collection in the series each time it is called, or nil if there are no more collections.
separatorThe element of ‘bases’ to split over.
-
The contents of ‘bases’ up to the next occurrence of ‘separator’.
Declaration
Swift
public mutating func next() -> Base.SubSequence?
View on GitHub
PartialSourceLazySplitSequence Structure Reference