Recursive LISP function to find the power of a number

(defun power(base exp)
 ( if (eq exp 0) 1 ( * base (power base (- exp 1)) ) )
)

power 3 2 = 9

Comments