Skip to content

Function: sequence()

sequence<T>(…sources): Sequence<T>

Wrap one or more iterable sources in a single lazy Sequence, iterated in order. null/undefined sources are skipped; when nothing remains (every source omitted, null, undefined, or an empty array / Set / Map), emptySequence is returned. The result is single-pass

  • call .cache() to make it re-iterable.

A Map source contributes its values (see values), consistent with Collection’s value-typed T.

T

Element type of the sequence.

…readonly SequenceSource<T>[]

Iterables to concatenate, in order (Map sources use values).

Sequence<T>