Algorithm.foldl

Evaluates f(f(f(value, e1), e2),...en) using values from an enumerable.

Arguments

value0
is the first argument for the inner function call.
The
enumerable
provides the second arguments to function calls, can be a Container, a Range, or a builtin-list.
The
callable
has the following stack notation:

( inputValue0 inputValue1 -- outputValue )

Return values

value1
is the resulting value.

Complexity

Depends on the enumerable and the callable.

Example

"sl/algorithm" useFile 1 (2 3 4) [ swap 100 * + ] foldl print
Output:
1020304