If I have a flow of some completion progress, that...
# coroutines
y
If I have a flow of some completion progress, that doesn't ever self terminate. Say
flowOf(0.0, 0.5, 0.99, 1.0, 1.0, 1.0, 1.0, 1.0, ...)
Is there a nice operator to terminate after the first complete signal? Effectively
flowOf(0.0, 0.5, 0.99, 1.0)
, results are actually a data class with other interesting data, not a float.
y
Sure, but a simple conditional check (it != 1.0) will omit the first 1.0 value.
I want one more after it.
I'm about to write my own stateful operator for this.
y
Thanks, transformWhile wasn't obvious, but great idea.