/kotlin-sequences

A custom implementation of buildSequence() similar to existing Kotlin sequence() that builds a Sequence lazily yielding values one by one.

Primary LanguageKotlin

buildSequence()

Equivalent to:

fun <T> sequence(
    block: suspend SequenceScope<T>.() -> Unit
): Sequence<T>

For buildSequence we have:

fun <T> buildSequence(
    block: suspend Yieldable<T>.() -> Unit
): Sequence<T>