transcendental-lisp/lisp/fact.lisp

6 lines
63 B
Common Lisp

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