arrow-fx-coroutines / arrow.fx.coroutines.stream / Stream / drop

drop

fun drop(n: Int): Stream<O>

Drops n elements of the input, then echoes the rest. Alias for drop.

fun drop(n: Long): Stream<O>

Drops n elements of the input, then echoes the rest.

import arrow.fx.coroutines.stream.*

//sampleStart
suspend fun main(): Unit =
  Stream.range(0..10)
    .drop(5)
    .toList()
    .let(::println) // [5, 6, 7, 8, 9, 10]
//sampleEnd

Do you like Arrow?

Arrow Org
<