(defun mapcar-r (list fn) (if (atom list) (funcall fn list) (mapcar #'(lambda (item) (mapcar-r item fn)) list)))