A sequence whose elements are produced via repeated applications of a closure to some mutable state.

    @frozen struct UnfoldSequence<Element, State>


    The elements of the sequence are computed lazily and the sequence may potentially be infinite in length.

    Instances of UnfoldSequence are created with the functions sequence(first:next:) and sequence(state:next:).


    Instance Properties

    • var lazy: LazySequence<Self>

      A sequence containing the same elements as this sequence, but on which some operations, such as map and filter, are implemented lazily.

    • var underestimatedCount: Int

      A value less than or equal to the number of elements in the sequence, calculated nondestructively.

    Instance Methods

    Removed Members

    Instance Methods