(defun reduce (f x a) (if (null x) a (reduce f (cdr x) (funcall f (car x) a))))