elizarov
04/09/2017, 10:19 AMyield
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