6 lines
95 B
Common Lisp
6 lines
95 B
Common Lisp
(defun factorial (x)
|
|
(if (< x 0)
|
|
nil
|
|
(if (<= x 1)
|
|
1
|
|
(* x (factorial (- x 1))) ) ) )
|