Use this page as a map. Each card answers “what shape am I looking at?” and links to the page that explains the exact behavior. You do not need to memorize the cards before starting the course.
Literals and comments
value ; commentNumbers, booleans, strings, characters, and quoted symbols evaluate to predictable values. A semicolon starts a line comment.
(list 42 #t "tea" #\T 'ready)
; the comment is ignored
Calls and nesting
(procedure argument ...)The first expression selects a procedure. Operator and arguments are evaluated from left to right; nested calls finish before their value is used.
(+ 10 (* 2 3))
Names and local bindings
define · let · let* · letrecUse define for a top-level name, let for parallel local inputs, let* when
a later binding needs an earlier one, and letrec for recursive local names.
(let ((price 20) (fee 3))
(+ price fee))
Named procedures and lambda
(define (name x) body) · (lambda (x) body)A procedure is a value. Give it a top-level name with definition shorthand or
create it inline with lambda.
(define (double n) (* n 2))
(double 6)
Conditions
if · cond · case · and · orif chooses between two expressions. cond names several tests. and and
or stop as soon as the result is known. Only #f is false.
(if (>= 62 50) 'free 'standard)
Quoted data and lists
'datum · (list value ...)A quote preserves a form as data. list evaluates its inputs and constructs a
new proper list.
(list 'decision 'allow)
Strings, vectors, and bytes
"text" · #(value ...) · #u8(byte ...)Strings hold Unicode text. Vectors are indexed aggregates and are mutable in the current profile. Bytevectors hold bounded bytes and remain immutable.
(list (string-length "Lispex")
(vector-ref #(red green blue) 1))
Recursion and higher-order work
recur · map · filter · fold · applyUse a shrinking recursive call for structural work, or pass a procedure to
map, filter, and folds. Proper tail calls support loop-shaped recursion.
(map (lambda (n) (* n 10)) '(1 2 3))
Advanced next
| Question | Continue with |
|---|---|
| How can closures share a changing binding? | Bindings, Cells, and Mutation and Closures |
Why does 1/3 stay exact while 1.0/3 is inexact? | Exact and Inexact Numbers |
| How can one computation return two results? | Multiple Values |
| Which recursive calls use constant stack? | Proper Tail Calls |
| When is an escape continuation appropriate? | Continuations and dynamic-wind |
| How are infinite work and huge output stopped? | Determinism and Resources |
For exact accepted tokens and form shapes, use Reader Grammar and Core Forms. Return to the Learning Path when you want a guided sequence.