arrow-fx-coroutines / arrow.fx.coroutines.stream / Stream / delete
fun delete(p: (O) ->
Boolean
):
Stream
<O>
Skips the first element that matches the predicate.
import arrow.fx.coroutines.stream.*
//sampleStart
suspend fun main(): Unit =
Stream.range(1..10)
.delete { it % 2 == 0 }
.toList()
.let(::println) // [1, 3, 4, 5, 6, 7, 8, 9, 10]
//sampleEnd
Do you like Arrow?
✖