;; 11.1 (define (answer-for-11.1) '(-1 11 16 16 16)) ;; To see the derivations, evaluate the following expressions in the ;; interpreter from lecture 22: ;; 1. -(4,3) ;; 2. let x = 4 in +(let x = 7 in x, x) ;; 3. let x = 8 in ((proc(x)proc(y)*(y, 2) 10) x) ;; 4. let x = 9 in ((proc(x)proc(y)+(x, y) 7) x) ;; 5. let f = proc(g)*((g 3),4) in (f proc(w)if w then (f proc(x)1) else w) ;; 11.2 (define (answer-for-11.2) '((exn 1) (exn 3) (val 5) (val 6) (val 7) (val 7) (val 5))) ;; To see the derivations, evaluate the following expressions in the ;; interpreter from lecture 23: ;; 1. raise 1 ;; 2. +(1, raise 3) ;; 3. if 0 then raise 1 else 5 ;; 4. +(1, try 5 handle proc(x)+(x,1)) ;; 5. +(1, try raise 5 handle proc(x)+(x,1)) ;; 6. try try raise 5 handle proc(x)7 handle proc(y)8 ;; 7. ((proc(f)proc(g)try (f 1) handle g proc(x)raise 1) proc(y)5) ;; 11.3 (define (answer-for-11.3) 6) ;; To see the derivations, evaluate the following expression in the ;; interpreter from lecture 23: ;; +(1, let f = letcc k in proc(y)continue k y in (f proc(x)5))