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

emits

fun <A> emits(vararg aas: A): Stream<A>

Creates a pure stream that emits the supplied values.

import arrow.fx.coroutines.stream.*

//sampleStart
suspend fun main(): Unit =
  Stream.emits(1, 2, 3)
    .toList()
    .let(::println) // [1, 2, 3]
//sampleEnd

Do you like Arrow?

Arrow Org
<