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

5 lines
87 B
Common Lisp

(defun my-expt-do (a b)
(do ((x 1 (* x a))
(y 0 (+ y 1)))
((= y b) x)))