Skip to content

reduce

reduce<A, B>(initial, f): (data) => B

Defined in: Core/Arr.ts:332

Reduces an array from the left.

A

B

B

(acc, a) => B

(data): B

readonly A[]

B

pipe([1, 2, 3], Arr.reduce(0, (acc, n) => acc + n)); // 6