程序代写 CSSE 304 References quiz: May 4, 2015 (Session 29) Name _____________

CSSE 304 References quiz: May 4, 2015 (Session 29) Name _________________ Section: 01 02 03
(20 homework points)

1. (12) For the reference ADT constructor (which is also a new observer in the environment ADT) and the two new procedures that take a reference as one of their arguments, fill in the details of this table:

Copyright By PowCoder代写 加微信 powcoder

Procedure name
Argument(s)
What the procedure returns

2. (8) Assume that the above three functions have been implemented (that is what we will do today). How could we implement the following in terms of them?

(define apply-env
(lambda (env sym) ; you fill in the rest

(define eval-exp
(lambda (exp env)
(cases expression exp

; the other cases would go here …

[set!-exp (id exp) ; you fill in the details for this case

Turn in this quiz and pick up today’s class notes handout.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com