PartialSourceLazySplitSequence

public struct PartialSourceLazySplitSequence <Base: Collection>: IteratorProtocol, LazySequenceProtocol where
	Base.Iterator.Element: Equatable,
	Base.SubSequence: RangeReplaceableCollection,
	Base.SubSequence.Iterator.Element==Base.Iterator.Element,
	Base.SubSequence==Base.SubSequence.SubSequence

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.

    • Parameters:
      • bases: A function which returns the next collection in the series each time it is called, or nil if there are no more collections.
      • separator: The element of ‘bases’ to split over.

    Declaration

    Swift

    public init (_ bases: @escaping ()->Base?, separator: Base.Iterator.Element)

    Parameters

    bases

    A function which returns the next collection in the series each time it is called, or nil if there are no more collections.

    separator

    The 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?