previous | index | next

Tree Recursive Procedure for power

(define power
  (lambda (b e)
    (if (= e 0)
        1
        (if (even? e)
            (* (power b (/ e 2))
               (power b (/ e 2)))
            (* b (power b (- e 1)))))))

previous | index | next