effect-io-ai

Package: effect
Module: Sink

Sink.reduceWhileEffect

A sink that effectfully reduces input elements from the provided initial state with f while the specified predicate returns true.

Signature

declare const reduceWhileEffect: <S, In, E, R>(initial: LazyArg<S>, predicate: Predicate<S>, f: (s: S, input: In) => Effect.Effect<S, E, R>) => Sink<S, In, In, E, R>

Source

Since v4.0.0