RosettaCodeData/Task/Exponentiation-operator/Common-Lisp/exponentiation-operator-2.lisp
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

4 lines
89 B
Common Lisp

(defun my-expt-rec (a b)
(cond
((= b 0) 1)
(t (* a (my-expt-rec a (- b 1))))))