effect-io-ai

Package: effect
Module: BigInt

BigInt.sumAll

Takes an Iterable of bigints and returns their sum as a single `bigint

Example

import * as assert from "node:assert"
import { sumAll } from "effect/BigInt"

assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n)

Signature

declare const sumAll: (collection: Iterable<bigint>) => bigint

Source

Since v2.0.0