= foldr =
see also [wiki:Folds]
{{{#!scheme
(define foldr (lambda (f z xs)
(if (null? xs)
z
(f (car xs) (foldr f z (cdr xs))))))
}}}
{{{#!haskell
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs)
}}}
{{{#!haskell
foldr(F, Z, [H|T]) -> F(H, foldr(F, Z, T));
foldr(F, Z, []) when is_function(F, 2) -> Z.
}}}