3 lines
88 B
Common Lisp
3 lines
88 B
Common Lisp
(defun factorial (n)
|
|
(cond ((zerop n) 1)
|
|
(t (times n (factorial (sub1 n))))))
|