arrow-fx-coroutines / arrow.fx.coroutines.stream / Pipe

Pipe

typealias ~~Pipe~~<I, O> = (Stream<I>) -> Stream<O> Deprecated: Pipe is deprecated as part of Stream deprecation.

A stream transformation can be represented as a function from stream to stream. This means that Pipe is also an alias for fun Stream<I>.name(): Stream<O>.

Pipes are typically applied with the through operation on Stream.

This is useful when you want to expose a Stream transformation from a data type. This can not conveniently be done with extension functions.

i.e. arrow.fx.coroutines.stream.concurrent.Queue.dequeueBatch

fun <I, O> ~~Pipe~~(pipe: (Stream<I>) -> Stream<O>): Pipe<I, O> Deprecated: Pipe is deprecated as part of Stream deprecation.

Do you like Arrow?

Arrow Org
<