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

adeln

07/19/2019, 1:57 PM
hey folks! I’m trying to merge two flows, is this the simpliest way to do that currently?
Copy code
fun <T> merge(f1: Flow<T>, f2: Flow<T>): Flow<T> =
    flowOf(f1, f2).flattenMerge()
v

Vsevolod Tolstopyatov [JB]

07/19/2019, 2:02 PM
Hi,
flattenMerge
does it concurrently and
flattenConcat
concatenates it. Both are fine
a

adeln

07/19/2019, 3:49 PM
thank you so much!
3 Views