invoke

operator fun <T> Stream<T>.invoke(handler: (T) -> Unit): () -> Unit

Subscribes to a Stream.

When the components is destroyed, the subscription will be unsubscribed automatically.