Second Attempt: mod-expt

     (define mod-expt
       (lambda (base exponent modulus)
         (define mod*
           (lambda (x y)
             (remainder (* x y) modulus)))
         (if (= exponent 0)
             1
             (if (even? exponent)
                 (mod* (mod-expt base (/ exponent 2) modulus)
                       (mod-expt base (/ exponent 2) modulus))
                 (mod* (mod-expt base (- exponent 1) modulus)
                       base)))))
Q: What is the recursion depth in terms of the exponent e?