effect-io-ai

Package: effect
Module: Sink

Sink.foldChunks

A sink that folds its input chunks with the provided function, termination predicate and initial state. contFn condition is checked only for the initial value and at the end of processing of each chunk. f and contFn must preserve chunking-invariance.

Signature

declare const foldChunks: <S, In>(s: S, contFn: Predicate<S>, f: (s: S, chunk: Chunk.Chunk<In>) => S) => Sink<S, In>

Source

Since v2.0.0