Here are some hints and tidbits that may help with this assignment:
Boxes are built-in in Scheme. Could you write a datatype for boxes?
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
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?