effect-io-ai

Package: effect
Module: Sink

Sink.reduceWhile

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

Signature

declare const reduceWhile: <S, In>(initial: LazyArg<S>, predicate: Predicate<S>, f: (s: S, input: In) => S) => Sink<S, In, In>

Source

Since v4.0.0