« Which TA to see about which homework assignments | Main | Submission system update »
February 2, 2009
Tip for HW #13
Remember that the syntax for a clause in the cases expression is
{ (variant-name ( { field-name }* ) consequent) } *
Notice that you have to give it a list of field names, even if empty. So,
(empty-tree 0)
as a clause in a cases expression will crash while
(empty-tree () 0)
will work.
Apparently the latest version of DrScheme (which most of you are running) allows you to leave the field list out, but the version running on the server strictly uses the syntax given in the book and notes. If you find that code that works fine on your system and test cases causes the autograder to report that your code crashes, try checking this.
Posted by morse at February 2, 2009 7:04 PM