StructureSwift

PrefixSequence

A sequence that only consumes up to n elements from an underlying Base iterator.

@frozen struct PrefixSequence<Base> where Base : Sequence

Overview

The underlying iterator’s sequence may be infinite.

Members

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

Structures

  • struct Iterator

    A type that provides the sequence’s iteration interface and encapsulates its iteration state.

Conforms To

Removed Members