transcendental-lisp/lisp/fact.lisp

7 lines
64 B
Common Lisp

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