subsequences

Lazily generates every prefix (i.e. leading subsequence) of this sequence, from the singleton sequence containing only the first element up to the full sequence, one element longer than the previous at each step; stops as soon as a prefix turns out shorter than requested (i.e. once this sequence is exhausted). Note that, despite the name, this yields growing prefixes, not every possible (non-contiguous) subsequence.


Same as Sequence.subsequences, but starting from an Iterable.


fun <T> subsequences(vararg items: T): Sequence<Sequence<T>>

Same as Sequence.subsequences, taking the items to generate prefixes of as varargs.