CPSC 425 Assignment 7
Data Structure Representation
Due Before Class on Wednesday, February 3rd
Read sections 2.3 through 2.5 of Essentials of Programming Languages and complete the following exercises:
- 2.15 (pg. 43)
- example usage : (var-exp? (lambda-exp 'x (var-exp 'y))) = #f
- example usage : (lambda-exp? (lambda-exp 'x (var-exp 'y))) = #t
- example usage : (lambda-exp->bound-var (lambda-exp 'x (var-exp 'y))) = x
- example usage : (lambda-exp->body (lambda-exp 'x (var-exp 'y))) = y
- 2.21 (pg. 50)
- example usage : (has-binding? (empty-env-exp) 'a) = #f
- example usage : (has-binding? (non-empty-env-exp 'a 1 (empty-env-exp)) 'a) = #t
- 2.29 (pg. 54)
- example usage : (unparse-lc-exp* (var-exp* 'x)) = x
- example usage : (unparse-lc-exp* (lambda-exp* (list 'x 'y) (var-exp* 'z))) = (lambda (x y) z)
Submission: Submit through the course blackboard site.