Syntax at a Glance

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

Treat this page as a map. Each card answers “what shape am I looking at?” and links to the page explaining its 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. A nested call finishes before the outer form uses its value.

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

Names and local bindings

define · let · let* · letrec

Choose 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. The list procedure 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 store ordered elements you reach by index and are mutable in the current profile. Bytevectors hold bytes from 0 through 255 and remain immutable. Below, string-length counts the characters in a string and vector-ref takes one element out by a zero based index.

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

Decompose data structures with a shrinking recursive call, 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

Consult Reader Grammar and Core Forms for exact accepted tokens and form shapes. Revisit the Learning Path when you want a guided sequence.