effect-io-ai

Package: effect
Module: Stream

Stream.runFold

Executes a pure fold over the stream of values - reduces all elements in the stream to a value of type S.

Signature

declare const runFold: { <S, A>(s: S, f: (s: S, a: A) => S): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E, R>; <A, E, R, S>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, R>; }

Source

Since v2.0.0