| Assigned: | Tue, Dec 8 |
|---|---|
| Due: | Thu, Dec 15, 9–11am |
Your final assignment (exam) for this semester will be to add list processing to the LET Language of EoPL chapter 3. Copy the starter code to your course directory from the command prompt as follows:
$ cd ~/cs235 $ cp -r /home/cs235/interps/lecture03/let-lang ./ $ mv let-lang/ final-exam/
Here is Exercise 3.9 from the EOPL3 text:
Exercise 3.9 [**] Add list processing operations to the language, including cons, car, cdr, null? and emptylist. A list should be able to contain any expressed value, including another list. Give the definitions of the expressed and denoted values of the language, as in section 3.2.2. For example,
let x = 4
in cons(x,
cons(cons(-(x,1),
emptylist),
emptylist))
should return an expressed value that represents the list (4 (3)).
Test your solution by running it on the tests already in tests.scm, plus the tests you add for the new list processing operations.
Turn in a single package with
lang.scm,
cons, car, cdr, null?, and emptylist)
interp.scm,
data-structures.scm, and
tests.scm.
submit235 script