(defun factorial (x) (if (< x 0) nil (if (<= x 1) 1 (* x (factorial (- x 1))) ) ) )