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

Function sumAll

packages/effect/src/Number.ts:566–572  ·  view source on GitHub ↗
(collection: Iterable<number>)

Source from the content-addressed store, hash-verified

564 * @since 2.0.0
565 */
566export const sumAll = (collection: Iterable<number>): number => {
567 let out = 0
568 for (const n of collection) {
569 out += n
570 }
571 return out
572}
573
574/**
575 * Takes an `Iterable` of `number`s and returns their multiplication as a single `number`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected