arrow-fx-coroutines / arrow.fx.coroutines.stream / Stream / chunks
fun chunks():
Stream
<
Chunk
<O>>
Outputs all chunks from the source stream.
import arrow.fx.coroutines.stream.*
//sampleStart
suspend fun main(): Unit =
Stream(1).append { Stream(2, 3).append { Stream(4, 5, 6) } }
.chunks()
.toList()
.let(::println) //[Chunk(1), Chunk(2, 3), Chunk(4, 5, 6)]
//sampleEnd
Do you like Arrow?
✖