Executes a pure fold over the stream of values.
Executes a pure fold over the stream of values. Returns a managed value that represents the scope of the stream.
Executes an effectful fold over the stream of values.
Executes an effectful fold over the stream of values. Returns a managed value that represents the scope of the stream.
Executes a pure fold over the stream of values.
Executes a pure fold over the stream of values. Returns a managed value that represents the scope of the stream. Stops the fold early when the condition is not fulfilled.
Executes an effectful fold over the stream of values.
Executes an effectful fold over the stream of values. Returns a managed value that represents the scope of the stream. Stops the fold early when the condition is not fulfilled. Example:
Stream(1) .fold(0)(_ <= 4)((s, a) => ZIO.succeed(s + a)) // Managed[Nothing, Int] .use(ZIO.succeed) // UIO[Int] == 5
function which defines the early termination condition
Like ZStream#runForeachChunk, but returns a scoped ZIO
so the
finalization order can be controlled.
Like ZStream#foreach, but returns a ZManaged
so the finalization
order can be controlled.
Like ZStream#runForeachWhile, but returns a scoped ZIO
so the
finalization order can be controlled.
Like ZStream#runIntoHub, but provides the result as a ZManaged to allow for scope composition.
Like ZStream#runIntoQueue, but provides the result as a ZManaged to allow for scope composition.
Like ZStream#runIntoQueue, but provides the result as a ZManaged to allow for scope composition.