transcendental-lisp/lisp/fact.lisp

6 lines
63 B
Common Lisp
Raw Normal View History

2016-12-07 14:16:45 -05:00
(defun fact (x)
(if (< x 2) 1
(* x (fact (- x 1)))
)
)