Once upon a time long long ago, someone "translate...
# coroutines
t
Once upon a time long long ago, someone "translated" a flow/map/collect call into the "imperative" code that is running. Basically showing how the emit(FOO) is the one actually calling the collect lambda through all the chain. I can't find. It was really helpful for me, and now I'd like to help my co-worker. I don't know if this wonderful person did it manually, or there's a way to generate. If that makes sense, can you help do it again? 🙂
Copy code
suspend fun foo(){
       flow { emit(1)  }
            .map { it*2 }
            .collect { println(it) }
    }
c
This presentation from KotlinConf might be what you’re thinking of

https://www.youtube.com/watch?v=tYcqn48SMT8â–ľ

t
very close.. Thanks!