Programming Clojure, Fourth Edition by Alex Miller
☰
About This Title
Pages: 320 Published: May 2026 ISBN: 9798888651919 In Print

Programming Clojure, Fourth Edition
by Alex Miller
Struggling with unnecessary complexity, unmanaged state, and brittle data that’s hard to change? Clojure combines the expressiveness of Lisp with the stability and performance of Java into a practical toolkit for creating simple, extensible applications. With immutable data structures, functional programming, and safe concurrency, Clojure makes it easier to write robust, reusable code. This definitive guide, written by members of the Clojure core team, introduces the language’s essentials and then shows how to put everything together in real applications. This edition adds practical coverage of project tooling and interactive development and fresh examples of the latest Clojure features.
eBook Formats:
-
PDF for desktop/tablets
-
epub for Apple Books, e-readers
-
mobi for Kindle readers
Get all eBook formats here for $34.95 (USD)
Paperback Formats:
- Order via Bookshop (U.S. Only)
Please support indie bookstores! Find indie bookstores in the U.S. Find indie bookstores around the world. Build cleaner, more reliable software that can respond to changing requirements over time. Combine Clojure’s tools for maximum effectiveness as you work with immutable data, functional programming, and safe concurrency to write programs that solve real-world problems.
Start by getting comfortable with Clojure’s concise syntax and its interactive REPL, then quickly move into building with immutable collections and the powerful sequence abstraction. Gain practical fluency with functional techniques such as higher-order functions, recursion, partial application, and memoization. Beyond the basics, learn to manage state with Clojure’s reference types, build open and extensible systems using protocols and multimethods, and unlock the power of macros for creating your own language features. Seamless Java interop lets you tap into the vast Java ecosystem without sacrificing clarity or safety.
This edition adds two new chapters on project tooling and interactive development, guiding you through modern workflows with tests, builds, editors, and the REPL at the center of your process. Learn how to set up projects, manage dependencies, and work productively in Clojure’s unique interactive style. When you’re finished, you’ll be able to think in Clojure: express solutions with clarity, leverage concurrency safely, and build real-world applications that are simpler and more maintainable than you thought possible.
What You Need
- Java 8 or newer
- Clojure 1.12 or newer
Resources
Releases:
2026/03/26
P1.0
2025/12/24
B3.0
Off to production
2025/11/25
B2.0
final beta
2025/10/17
B1.0
Initial beta release.
Contents & Extracts
- Welcome to Clojure
- Getting Started
- Simplicity and Power in Action

- Clojure Coding Quick Start
- Navigating Clojure Namespaces
- Wrapping Up
- Exploring Clojure
- Reading Clojure
- Functions
- Vars, Bindings, and Namespaces
- Metadata
- Calling Java
- Comments
- Flow Control
- Where’s My for Loop?
- Wrapping Up
- Developing Interactively
- The REPL (Read-Eval-Print-Loop)
- Editors
- Structural Editing
- Loading and Evaluating Code
- Dependencies in the REPL
- Wrapping Up
- Data and Functions
- Unifying Data with Sequences
- Everything Is Seq-able
- Using the Sequence Functions
- Lazy and Infinite Sequences
- Clojure Makes Java Seq-able
- Calling Structure-Specific Functions
- Wrapping Up
- Functional Programming
- Functional Programming Concepts
- How to Be Lazy
- Lazier Than Lazy
- Recursion Revisited
- Eager Transformations
- Wrapping Up
- Describing Your Data with Specs
- Defining Specs
- Validating Data
- Validating Functions
- Generative Function Testing
- Wrapping Up
- Intermediate Topics
- State and Concurrency
- Concurrency, Parallelism, and Locking
- Use Atoms for Uncoordinated, Synchronous Updates
- Refs and Software Transactional Memory
- Use Agents for Asynchronous Updates
- Managing Per-Thread State with Vars
- A Clojure Snake
- Wrapping Up
- Protocols and Datatypes
- Programming to Abstractions
- Interfaces
- Protocols
- Datatypes
- Records

- reify
- Metadata Extension
- Wrapping Up
- Multimethods
- Living Without Multimethods
- Defining Multimethods
- Moving Beyond Simple Dispatch
- Creating Ad Hoc Taxonomies
- When Should I Use Multimethods?
- Wrapping Up
- Java Interop
- Creating Java Objects in Clojure
- Calling Clojure From Java
- Exception Handling
- Optimizing for Performance
- Handling Java Streams
- A Real-World Example
- Wrapping Up
- Macros
- When to Use Macros
- Writing a Control Flow Macro
- Making Macros Simpler
- Taxonomy of Macros
- Wrapping Up
- Clojure in Practice
- Project Tooling

- Project Sources and Dependencies
- Running a REPL
- Defining Tests
- Running Tests
- Building and Releasing Libraries
- Compiling Applications
- Wrapping Up
- Building an Application
- Getting Started
- Developing the Game Loop
- Representing Progress
- Implementing Players
- Interactive Play
- Documenting and Testing Your Game
- Farewell
Author
Alex Miller has been a member of the Clojure core team since 2013 and is the coauthor of Clojure Brain Teasers and Clojure Applied. Alex is the creator or organizer of the Strange Loop, Lambda Jam, Clojure/west, and Clojure/conj conferences. In his free time he dabbles in music production, astronomy, and beekeeping.
eBook Formats:
-
PDF for desktop/tablets
-
epub for Apple Books, e-readers
-
mobi for Kindle readers
Get all eBook formats here for $34.95 (USD)
Paperback Formats:
- Order via Bookshop (U.S. Only)
Please support indie bookstores! Find indie bookstores in the U.S. Find indie bookstores around the world.
Releases, Offers & More
Be the first to hear about our newest content, best promotions and upcoming events. Plus get 25% off your next purchase.
Related categories:
Related Titles:

About This Title
Pages: 320 Published: May 2026 ISBN: 9798888651919 Edition: 1 In Print