MCPcopy
hub / github.com/Effect-TS/effect / fold

Function fold

packages/effect/src/internal/sink.ts:811–815  ·  view source on GitHub ↗
(
  s: S,
  contFn: Predicate<S>,
  f: (s: S, input: In) => S
)

Source from the content-addressed store, hash-verified

809
810/** @internal */
811export const fold = <S, In>(
812 s: S,
813 contFn: Predicate<S>,
814 f: (s: S, input: In) => S
815): Sink.Sink<S, In, In> => suspend(() => new SinkImpl(foldReader(s, contFn, f)))
816
817/** @internal */
818const foldReader = <S, In>(

Callers 6

collectAllUntilFunction · 0.85
everyFunction · 0.85
foldLeftFunction · 0.85
foldUntilFunction · 0.85
headFunction · 0.85
someFunction · 0.85

Calls 2

foldReaderFunction · 0.85
suspendFunction · 0.70

Tested by

no test coverage detected