hole in the scope
a different way to see this problem
- what is the scope of exp’s parameter k?
(define (exp x k)
(define (helper k s)(if (= k 0) s
(helper x (- k 1) (* x s))))
(helper k 1)))
- the scope has a ‘hole’
exp’s k is unavailable inside helper
helper’s k shadows exp’s k