foldr

Rebuilds a list by applying a function over it.  For example, to copy a list, one would write:

foldr(pair, #(), #(1, 2, 3, 4, 5)) ⇒ #(1, 2, 3, 4, 5)

Exercise: what is the result when you replace pair with list?

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>.
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.