<@U0C12L58V> I'd start with the source code of Kot...
# coroutines
e
@yasyd I'd start with the source code of Kotlin's generate/yield and change it so that
yield
returns a value that
next
accepts as a parameter. You can either find the source in the Kotlin github repo, or start wih a simpler code that is given as the example to the Kotlin coroutines design document: https://github.com/Kotlin/kotlin-coroutines/blob/master/examples/sequence/buildSequence.kt