MCPcopy Create free account
hub / github.com/effect-app/libs / collect

Function collect

repos/effect/packages/effect/src/Sink.ts:1539–1543  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1537 */
1538export const sum: Sink<number, number> = reduceArray(() => 0, (s, arr) => {
1539 for (let i = 0; i < arr.length; i++) {
1540 s += arr[i]
1541 }
1542 return s
1543})
1544
1545/**
1546 * A sink that counts the number of elements fed to it.

Callers 2

Record.tsFile · 0.70
valuesFunction · 0.70

Calls 2

reduceArrayFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…