Course:CPSC311/2010WT1/Assignment 1 Gotchas
Appearance
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
- Focus on the guide (http://docs.racket-lang.org/guide/) to learn new elements of Racket and the general docs (http://docs.racket-lang.org/) for reference
- Don't forget to put
#lang plaiat the top of your file (or have it added automatically)
PLAI/Racket Gotchas for Experienced Schemers
()is not the empty list in Racket. Use'()oremptyinstead.
Other Stuff
- You can access the fields of a type with a
type-caseexpression, but for small accesses (like theBindingtype), try either writing your own reusable access method that usestype-caseor 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) andbinop-lhs(though you'll probably wanttype-casefor that one).