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

ubu

04/08/2020, 6:08 PM
Hi guys. Is there an equivalent to
Flow.withLatestFrom(other: Flow<B>, transform: suspend (A,B) -> R
) that takes several
other
Flows? I need values emitted downstream only when source flow changes.
It doesn't do several automatically but shouldn't be hard to chain.
u

ubu

04/08/2020, 6:31 PM
It seems that this operator emits values every time there is a new value from one of the combined flow. Correct me if I'm wrong
a

alexey_gusev

04/08/2020, 6:46 PM
do you want to wait until all of them emit? maybe
zip
is what you’re after?
d

Dominaezzz

04/08/2020, 7:12 PM
@ubu Yes
If you have a two flows. • a, b, c, d • 1, 2, 3, 4 It'll emit something like, a1, a2, b2, c2, etc. What do you want to emit?
u

ubu

04/09/2020, 9:05 AM
I will repost this question in few minutes.
@Dominaezzz, thanks for taking interest!
80 Views