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

void

fun void(): Stream<Nothing>

Removes all output values from this stream.

Often used with merge to run one side of the merge for its effect while getting outputs from the opposite side of the merge.

import arrow.fx.coroutines.stream.*

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

Do you like Arrow?

Arrow Org
<