arrow-fx-coroutines / arrow.fx.coroutines.stream / toList

toList

suspend fun <O> Stream<O>.toList(): List<O>

Runs all the effects of this Stream and collects all emitted values into a List. If the Stream doesn’t emit any values it returns emptyList.

This a terminal operator, meaning this functions suspends until the Stream finishes. If any errors are raised while streaming, it’s thrown from this suspend scope.

Do you like Arrow?

Arrow Org
<