effect-io-ai

Package: effect
Module: Chunk

Chunk.mapAccum

Statefully maps over the chunk, producing new elements of type B.

Signature

declare const mapAccum: { <S, A, B>(s: S, f: (s: S, a: A) => readonly [S, B]): (self: Chunk<A>) => [S, Chunk<B>]; <S, A, B>(self: Chunk<A>, s: S, f: (s: S, a: A) => readonly [S, B]): [S, Chunk<B>]; }

Source

Since v2.0.0