Quiz #4

Evaluate the following using dynamic and lexical scope (using applicative order of evaluation). Draw the corresponding environment diagrams for both cases.

> (define x 4)
> (define (w s) (* x s))
> (define (h x) (w 5))
> (h 7)