arrow-fx-coroutines / arrow.fx.coroutines.stream / firstOrError
suspend fun <O>
Stream
<O>.firstOrError(): O
Runs the first effect of this Stream, raising a NoSuchElementException if the stream emitted no values and returns the value if emitted.
This a terminal operator, meaning this functions suspend
s until the Stream finishes.
If any errors are raised while streaming, it’s thrown from this suspend
scope.
Do you like Arrow?
✖