Alexander Maryanovsky
05/23/2022, 8:42 AMcombine(flows, transform)
not call transform
if flows
is empty? Is that intended? Seems like it would be more natural to call it with an empty array.ephemient
05/23/2022, 11:27 AMAlexander Maryanovsky
05/23/2022, 11:36 AMInt
, and I need to return a flow of their sum.combine(flows, Array<Int>::sum)
seems like an intuitive solution that fails when flows
is empty.ephemient
05/23/2022, 11:55 AMcombine(List(n) { flowOf(*Array(m) { 0 }) }, transform)
the way I see it: in general, this can call transform
anywhere in n..n*(m-1)+1
times. when n=0
, 0 times is a reasonable ourcomeAlexander Maryanovsky
05/23/2022, 12:20 PMcombine(List(n){ flowOf(0) }, transform)
calls transform exactly once for every value of n
except 0
Nick Allen
05/23/2022, 5:50 PMcombine(List(n){ flowOf(0) }, transform)
also receives emitted most recent values (which is what it operates on) for every n
except 0
.ephemient
05/23/2022, 5:54 PMcombine(List(n) { flowOf() }, transform)
calls transform
0 times for any value of n
, including 0