modify

open fun modify(block: T.() -> T)

Modifies the current value by calling the block and sends it the result as the next value.

The block will have the current value of the stream as the scopes this pointer.