Skip to content

reduce

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

Defined in: Data/Arr.ts:512

Reduces an array from the left.

A

B

B

(acc, a) => B

(data) => B

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