Algorithm.reduce
Calculates f(f(f(e1,e2),e3),...en) using values from an enumerable.
Arguments
The
enumerable
provides the arguments to function calls.The
callable
is a function with the following stack notation:( inputValue0 inputValue1 -- outputValue )
Return values
value1
is the resulting value.
Complexity
Depends on the enumerable and the callable.
Example
Output:
720
122923