Jiri Bruchanov
10/06/2021, 7:08 PMval flow = MutableSharedFlow<Int>()
flow.tryEmit(1)
flow.tryEmit(2)
flow.tryEmit(3)
and was hoping to do something like following, but that doesn't worj
flow
.zip(flow.drop(1)) { x, y -> y - x}
.collect { incOrDec ->
println(incOrDec)
}
Cedrick Cooke
10/06/2021, 7:32 PMzipWithNext
in the comments of this issue: https://github.com/Kotlin/kotlinx.coroutines/issues/1767