Use let to store intermediate results. (define power (lambda (b e) (if (= e 0) 1 (if (even? e) (let ((p (power b (/ e 2)))) (* p p)) (* b (power b (- e 1)))))))
(define power (lambda (b e) (if (= e 0) 1 (if (even? e) (let ((p (power b (/ e 2)))) (* p p)) (* b (power b (- e 1)))))))