MCPcopy Create free account
hub / github.com/Effect-TS/effect / foldWeighted

Function foldWeighted

packages/effect/src/internal/sink.ts:1098–1109  ·  view source on GitHub ↗
(
  options: {
    readonly initial: S
    readonly maxCost: number
    readonly cost: (s: S, input: In) => number
    readonly body: (s: S, input: In) => S
  }
)

Source from the content-addressed store, hash-verified

1096
1097/** @internal */
1098export const foldWeighted = <S, In>(
1099 options: {
1100 readonly initial: S
1101 readonly maxCost: number
1102 readonly cost: (s: S, input: In) => number
1103 readonly body: (s: S, input: In) => S
1104 }
1105): Sink.Sink<S, In, In> =>
1106 foldWeightedDecompose({
1107 ...options,
1108 decompose: Chunk.of
1109 })
1110
1111/** @internal */
1112export const foldWeightedDecompose = <S, In>(

Callers 2

collectAllToMapNFunction · 0.85
collectAllToSetNFunction · 0.85

Calls 1

foldWeightedDecomposeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…