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

tail

fun tail(): Stream<O>

Emits all elements of the input except the first one.

import arrow.fx.coroutines.stream.*

//sampleStart
suspend fun main(): Unit =
  Stream.range(0..5)
    .tail()
    .toList()
    .let(::println) // [1, 2, 3, 4, 5]
//sampleEnd

Do you like Arrow?

Arrow Org
<