term1 Definition1term2 Definition2term3 Definition3
Please sign in to your Google account to access your documents:
PARSING
By “parenthesizing everything” Racket has a syntax that is unambiguous. There are never any rules to learn about whether 1+2*3 is 1+(2*3) or (1+2)*3 and whether f x y is (f x) y or f (x y). It makes parsing, converting the program text into a tree representing the program structure.
CONS CELL
Cons cells are immutable: When you create a cons cell, its two fields are initialized and will never change. Hence we can continue to enjoy the benefits of knowing that cons cells cannot be mutated by other code in our program. It has another somewhat subtle advantage: The Racket implementation can be clever enough to make list? a constant-time operation since it can store with every cons cell whether or not it is a proper list when the cons cell is created.
IMPROPER LIST
A cons cell that is not a list is often called an improper list, especially if it has nested cons cells in the second position, e.g., (cons 1 (cons 2 (cons 3 4))) where the result prints as ’(1 2 3 . 4).
Need help typing ? See our FAQ (opens in new window)
Please sign in to create this set. We'll bring you back here when you are done.
Discard Changes Sign in
Please sign in to add to folders.
Sign in
Don't have an account? Sign Up »
You have created 2 folders. Please upgrade to Cram Premium to create hundreds of folders!