fold-right
reduces a sequence from right to left
Usage:
(fold-right func val? seq) (fold-right! func val? seq)These forms reduce a sequence from right to left. fold-right uses reverse, while fold-right! uses reverse! and can therefore work with non-reversible sequences by materializing them first. foldr is an alias for fold-right.
An Example
(fold-right cons '() [1 2 3])