Clojure · v1.0.2
2026-11-14 14:38:24
cond from make_pair, booleans from cond, arithmetic from numbersComposability: any program can be built by combining simpler programs.
pred and add take time proportional to the valueThe λ calculus is a model of computation, not a practical programming language.
three is three nested pairs; 1000 would be a thousand(add x y) applies succ and pred once for each unit of ypred steps down to zeroA programming language needs data that the machine represents directly.
(+ 1 2) is a list of three elements: a symbol and two numbersPrograms that construct programs are called macros.
What it gives
What it costs
Functional-first
Multi-paradigm
The family is defined by its syntax and its macros, not by purity.
| What the λ calculus lacks | What Clojure provides |
|---|---|
| native data | numbers, strings, vectors, maps as literals |
| practical repetition | functions that call themselves by name |
| a performance model | JVM bytecode; persistent data structures |
| code organisation | namespaces, and the JVM classpath |
| interoperability | direct calls into Java libraries |
Clojure keeps the λ calculus’s core and supplies what a working language needs.
Clojure is a simple and succinct language designed to use legacy code and multicore processors.
The three cannot be separated; each explains the others.
The minimum requirement to be a functional language is to treat functions as something more than named subroutines for executing blocks of code.
"hello" and 42 areImmutability by default is what makes purity practical.
The safety of passing by value, with the speed of passing by reference.
e to a persistent tree
xs: immutable nodes and references.
ys, sharing b, a, c and h with xs.d', g', f' are created only on the path to the rootxs and ysA value
42 is 42; subtracting 2 gives a new value, 40An identity
Only identities change, and only by taking a new value.
These are named here; the unit on state and concurrency treats them with code.
"a" + "b" + "c", the operator between operands+ is an ordinary function, so there is no precedence3 + 4 * 2 depends on precedence(+ 3 (* 4 2))(* 4 2) gives 8Operators are more concise; prefix makes every call consistent.

( is a function, macro, or special formA left parenthesis signals a function invocation.
Structural editors move whole expressions, so parentheses are never matched by hand.
String, numerals are LongIterable, Collection, List, Mapabs, exp, sin, …: they are called on java.lang.MathClojure does not hide its host; programming in it requires the basics of Java.
| Member | Form | Result |
|---|---|---|
| static field | Math/PI |
3.141592653589793 |
| static method | (Math/abs -3) |
3 |
| instance method | (.toUpperCase "foo") |
"FOO" |
| constructor | (new Integer "42"), (Integer. "42") |
42 |
(Integer. "42") is rewritten during macro expansion to (new Integer "42")Clojure Elements: Data Structures and Functions — the next unit in this module.