foldl

foldr in reverse.  This function rebuilds a list by recursively applying a function over the list.  For example

foldl(method(x, y) pair(factorial(x), y) end, #f, #(1, 2, 3, 4, 5))
⇒ #(120, 24, 6, 2, 1 . #f)

Note: the ugly dotted pair at the end is what occurs when nil is not #().

Exported from

Arguments

consAn instance of <function>.  The signature of the function is (<list>, <list>) => (<pair>).
nilAn instance of <object>.  Value returned if the list is empty.  In most cases this should be #().
lstAn instance of <list>.

Values

resultAn instance of <list>.
Rebuilds a list by applying a function over it.
Sequence-Utilities, written by Matthias Hölzl, provides common or oft-used operations performed on <sequence>s.
The class of objects that can be applied to arguments.
The class of linked lists.
The class of lists that can have new values assigned to their heads and tails.
The class of all Dylan objects.