CS 536 (F03) Homework 4: Small Hints


Here are some hints and tidbits that may help with this assignment:

  1. Boxes are built-in in Scheme. Could you write a datatype for boxes?

  2. You can compare instances of datatypes using the Scheme primitive eq?. For example

    > (let ([toy (ball 15)])
        (eq? toy toy))
    true
    
    > (eq? (ball 15) (ball 15)) 
    false
    

  3. Remember the diagrams we drew at the end of class (also in the notes). Look at how the interpreter handles/uses the environment. Can you do something similar for the store?


Back to Assignment 4

Back to the Assignments page