transcendental-lisp/lisp/fact.lisp

7 lines
64 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)))
)
)
2017-03-03 15:06:49 -05:00