effect-io-ai

Package: effect
Module: Stream

Stream.scanEffect

Statefully and effectfully maps over the elements of this stream to produce all intermediate results of type S given an initial S.

Signature

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

Source

Since v2.0.0