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

just

fun <O> just(o: O): Stream<O>

Creates a singleton stream that emits the supplied value.

import arrow.fx.coroutines.stream.*

//sampleStart
suspend fun main(): Unit =
  Stream.just(1)
    .toList()
    .let(::println) //[0]
//sampleEnd

Do you like Arrow?

Arrow Org
<