RosettaCodeData/Task/Exponentiation-operator/Common-Lisp/exponentiation-operator-2.lisp

5 lines
89 B
Common Lisp
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
(defun my-expt-rec (a b)
(cond
((= b 0) 1)
(t (* a (my-expt-rec a (- b 1))))))