effect-io-ai

Package: effect
Module: BigInt

BigInt.multiplyAll

Takes an Iterable of bigints and returns their product as a single bigint. Returns 1n for an empty iterable.

When to use

Use to multiply all bigint values in an iterable.

Example (Multiplying iterable bigints)

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

assert.deepStrictEqual(BigInt.multiplyAll([2n, 3n, 4n]), 24n)

See

Signature

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

Source

Since v2.0.0