Course:CPSC311/2010WT1/Assignment 1 Gotchas

From UBC Wiki

Assignment #1 Gotchas for Everyone

  • Don't kill yourself giving lovely errors on malformed input on this assignment. It's not required.
  • The IDE (DrRacket) does not automatically save your code when ran. Save manually (and often, as the debugger likes to crash).

Assignment #1 Gotchas for New Racketeers

PLAI/Racket Gotchas for Experienced Schemers

  • () is not the empty list in Racket. Use '() or empty instead.

Other Stuff

  • You can access the fields of a type with a type-case expression, but for small accesses (like the Binding type), try either writing your own reusable access method that uses type-case or the built-in accessors based on the type constructor names, not the type's names, like: binding-name (lowercase like the type constructor, not uppercase like the type) and binop-lhs (though you'll probably want type-case for that one).