Course:CPSC311/2010WT1/Assignment 1 Gotchas
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 plai
at the top of your file (or have it added automatically)
PLAI/Racket Gotchas for Experienced Schemers
()
is not the empty list in Racket. Use'()
orempty
instead.
Other Stuff
- You can access the fields of a type with a
type-case
expression, but for small accesses (like theBinding
type), try either writing your own reusable access method that usestype-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) andbinop-lhs
(though you'll probably wanttype-case
for that one).