SequenceBuilder

Common
JVM
JS
Native
1.1
abstract class SequenceBuilder<in T>

Builder for a Sequence or an Iterator, provides yield and yieldAll suspension functions.

Since Kotlin 1.3 use kotlin.sequences.SequenceScope instead.

See Also

buildSequence

buildIterator

kotlin.sequences.SequenceScope

Functions

Common
JVM
JS
Native
1.0

yield

Yields a value to the Iterator being built.

abstract suspend fun yield(value: T)
Common
JVM
JS
Native
1.0

yieldAll

Yields all values from the iterator to the Iterator being built.

abstract suspend fun yieldAll(iterator: Iterator<T>)

Yields a collections of values to the Iterator being built.

suspend fun yieldAll(elements: Iterable<T>)

Yields potentially infinite sequence of values to the Iterator being built.

suspend fun yieldAll(sequence: Sequence<T>)