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:

  1. a stopping point (= n 0)
  2. to build the answer (* n
  3. and movement towards the stopping point (fact (- n 1)))