scope
definition
- the region of code over which a variable is defined is called its scope
examples
- scope of helper
(define (exp x k)
(define (helper k s)(if (= k 0) s
(helper x (- k 1) (* x s))))
(helper k 1))
- scope of x
(define (exp x k)
(define (helper k s)(if (= k 0) s
(helper x (- k 1) (* x s))))
(helper k 1))