Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!


reduce(callbackFunction, initial = '')


Reduce the List to a single value, by applying a callback function to each item.

The callback receives 2 arguments:

Returns the final, singular value.

(This example uses the F and R shortcuts for function and return.)

let fnSum = F (total, num) { R total + num };

[3, 6, 9, 12].reduce(fnSum);
//= 30

See Also