arrow-fx-coroutines / arrow.fx.coroutines.stream / Chunk / scanLeftCarry
inline fun <O2> scanLeftCarry(z: O2, f: (O2, O) -> O2):
Pair
<
Chunk
<O2>, O2>
Like scanLeft
except the final element is emitted as a standalone value instead of as
the last element of the accumulated chunk.
Equivalent to val b = a.scanLeft(z)(f); val (c, carry) = b.splitAt(b.size - 1)
.
Do you like Arrow?
✖