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