is there a factory to fan-in two `Flow<T>` i...
# coroutines
g
is there a factory to fan-in two
Flow<T>
instances into a single
Flow<T>
d
There's
zip
and
combine
.
g
combine
is not what im looking for, I'm not looking to make two
Flow<T>
into a
Flow<R>
by matching events, I'm looking to multiplex the two events
with channels I'd use
produce
with a
select
statement. I think the same is true here.
o
make a
flowOf(a, b)
and
flatMapCombine
?
or rather, if you need to multiplex,
flatMapMerge
🤔 1
oop, those are for doing flat map as well. but it's the right direction, the one you really want is in the docs of that one:
flattenMerge
s
u
like rx
merge
?
g
@Seri thanks for this, I did end up with
flattenMerge
though progress with it has been tough
s
👍
g
note to self: there is a big difference between
flow.map { it.also { "INFO: $it" }}
and
flow.map { it.also { println("INFO: $it") } }
. 🤦‍♂️