Methods

reduceΒΆ

reduce(something:Eachable1, start:Any, f:Fun)

Combine items to a single value using the supplied binary function First f is applied to start and the first element of something then on each step f is applied to previous result and next element of something.
Source: stdlib.ngs:356

something

Instance of any type that has each(something, callback) implemented

start

First argument of f, for the first call of f

f

The combining function

Example

F sum(something) something.reduce(0, (+))