arrow-fx-coroutines / arrow.fx.coroutines.stream / stepLeg

stepLeg

fun <O> Pull<O, Unit>.stepLeg(): Pull<Nothing, StepLeg<O>?>

Like uncons, but instead of performing normal uncons, this will run the stream up to the first chunk available. Useful when zipping multiple streams (legs) into one stream. Assures that scopes are correctly held for each stream leg independently of scopes from other legs.

If you are not pulling from multiple streams, consider using uncons.

Do you like Arrow?

Arrow Org
<