arrow-fx-coroutines / arrow.fx.coroutines.stream / Chunk / firstOrNull

firstOrNull

fun firstOrNull(): O?

Gets the first element of this chunk.

inline fun firstOrNull(p: (O) -> Boolean): O?

Returns the first element for which the predicate returns true or null if no elements satisfy the predicate.

Do you like Arrow?

Arrow Org
<