A recursive function calls itself to solve a problem.
(defun fact (n)
(cond
((= n 0) 1))
(t (* n (fact (- n 1))))))All recursive functions need three things:
- a stopping point (= n 0)
- to build the answer (* n
- and movement towards the stopping point (fact (- n 1)))