Clojure is a modern functional Lisp dialect that runs on the Java Virtual Machine, JavaScript engines (ClojureScript), and the .NET CLR. Unlike traditional object-oriented languages, Clojure treats immutable, persistent data structures as first-class citizens and provides powerful concurrency primitives that eliminate the need for explicit locking. The language embraces a REPL-driven development workflow where code is iteratively built and tested in a live environment, dramatically shortening the feedback loop. One key mental model: in Clojure, functions compose data transformations rather than mutating stateβthis shift from "place-oriented programming" to "value-oriented programming" makes parallel execution safe by default and greatly simplifies reasoning about program behavior.
What This Cheat Sheet Covers
This topic spans 29 focused tables and 259 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Data Structures
| Structure | Example | Description |
|---|---|---|
[1 2 3](vector 1 2 3) | β’ Indexed collection with fast random access at any position β’ conj adds to end. | |
'(1 2 3)(list 1 2 3) | β’ Linked list optimized for sequential access from head β’ conj adds to front. | |
{:a 1 :b 2}(hash-map :a 1 :b 2) | β’ Key-value pairs with fast lookup β’ keys are typically keywords |