Syntax at a Glance

Scan the everyday Lispex syntax on one page, with tiny examples, observed results, and direct links to the full manual.

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 ; comment

Numbers, booleans, strings, characters, and quoted symbols evaluate to predictable values. A semicolon starts a line comment.

LISPEX
(list 42 #t "tea" #\T 'ready)
; the comment is ignored
Read the source and reader manual

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.

LISPEX
(+ 10 (* 2 3))
Learn evaluation order

Names and local bindings

define · let · let* · letrec

Use 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.

LISPEX
(let ((price 20) (fee 3))
  (+ price fee))
Learn bindings and scope

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.

LISPEX
(define (double n) (* n 2))
(double 6)
Learn procedures and arity

Conditions

if · cond · case · and · or

if chooses between two expressions. cond names several tests. and and or stop as soon as the result is known. Only #f is false.

LISPEX
(if (>= 62 50) 'free 'standard)
Choose a conditional form

Quoted data and lists

'datum · (list value ...)

A quote preserves a form as data. list evaluates its inputs and constructs a new proper list.

LISPEX
(list 'decision 'allow)
Learn data and aggregates

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.

LISPEX
(list (string-length "Lispex")
      (vector-ref #(red green blue) 1))
Open the text and byte reference

Recursion and higher-order work

recur · map · filter · fold · apply

Use a shrinking recursive call for structural work, or pass a procedure to map, filter, and folds. Proper tail calls support loop-shaped recursion.

LISPEX
(map (lambda (n) (* n 10)) '(1 2 3))
Build a data pipeline

Advanced next

QuestionContinue 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.