transcendental-lisp/lisp/random/fact.lisp

4 lines
59 B
Common Lisp

(defun fact (x)
(if (< x 2) 1
(* x (fact (- x 1)))))