https://kotlinlang.org logo
#coroutines
Title
# coroutines
t

taer

05/12/2021, 2:44 PM
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

Casey Brooks

05/12/2021, 3:14 PM
This presentation from KotlinConf might be what you’re thinking of

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

t

taer

05/12/2021, 3:26 PM
very close.. Thanks!
11 Views