Skip to content
Getting Clojure: Build Your Functional Skills One Idea at a Time

Getting Clojure: Build Your Functional Skills One Idea at a Time

August 12, 2026

Cover

Author: Russ Olsen
Publisher: Pragmatic Bookshelf
Year: 2018
Pages: 288
ISBN: 9781680503005
Source: Getting Clojure — Pragmatic Programmers

Summary

Getting Clojure by Russ Olsen is an accessible, idea-first introduction to Clojure. Olsen’s premise is that every language embodies a vision of how programs should be built — and Clojure’s is a radically simple language framework holding together a sophisticated collection of features. So the book teaches the mechanics of the language and the ideas behind them: not just Clojure syntax, but how to think functionally. It directly targets the steep learning curve that comes from Clojure being one of the purest ways to learn functional programming without compromise.

The book is organized as a progressive skill-build across three parts. Part I — Basics covers the REPL, the core data structures (vectors, lists, maps, keywords, sets), conditional logic, and the fundamentals of functions, let, vars, and namespaces. Part II — Intermediate dives into sequences, lazy sequences, destructuring, records and protocols, and testing (clojure.test, property-based testing, and spec). Part III — Advanced finishes with Java interop, threads, promises, and futures, state (atoms, refs, agents, and STM), read/eval, and macros.

Each chapter takes on a feature or two or three: it explains the syntax and mechanics first so the code works, then digs into the deeper questions — the thinking behind the feature and how it fits with the rest of the language. Chapters follow a consistent rhythm (In the Wild real-world examples, Staying Out of Trouble pitfalls, Wrapping Up recaps), grounded in how working Clojure programmers actually use the language. To follow along you’ll need Java 6 or newer, Clojure 1.8 or 1.9, and Leiningen 2.

Notes

  • Published by Pragmatic Bookshelf in May 2018
  • Available in print, ebook, and PDF/EPUB formats
  • Repository and issue tracker are on the PragProg site
  • To follow along with the examples, you’ll need Java 6 or newer, Clojure 1.8 or 1.9, and Leiningen 2

Table of Contents

(mirrors the publisher’s “Contents & Extracts” — full nested chapter/section structure)

Acknowledgments

Preface

Part I — Basics

  • Hello, Clojure
    • The Very Basics
    • Arithmetic
    • Not Variable Assignment, but Close
    • A Function of Your Own
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Vectors and Lists
    • One Thing After Another
    • A Toolkit of Functions
    • Growing Your Vectors
    • Lists
    • Lists versus Vectors
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • Maps, Keywords, and Sets
    • This Goes with That
    • Keywords
    • Changing Your Map Without Changing It
    • Other Handy Map Functions
    • Sets
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Logic
    • The Fundamental If
    • Asking Questions
    • Truthy and Falsy
    • Do and When
    • Dealing with Multiple Conditions
    • Throwing and Catching
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • More Capable Functions
    • One Function, Different Parameters
    • Arguments with Wild Abandon
    • Multimethods
    • Deeply Recursive
    • Docstrings
    • Pre and Post Conditions
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • Functional Things
    • Functions Are Values
    • Functions on the Fly
    • A Functional Toolkit
    • Function Literals
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Let
    • A Local, Temporary Place for Your Stuff
    • Let Over Fn
    • Variations on the Theme
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Def, Symbols, and Vars
    • A Global, Stable Place for Your Stuff
    • Symbols Are Things
    • Bindings Are Things Too
    • Varying Your Vars
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • Namespaces
    • A Place for Your Vars
    • Loading Namespaces
    • A Namespace of Your Own
    • As and Refer
    • Namespaces, Symbols, and Keywords
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up

Part II — Intermediate

  • Sequences
    • One Thing After Another
    • A Universal Interface
    • A Rich Toolkit …
    • … Made Richer with Functional Values
    • Map
    • Reduce
    • Composing a Solution
    • Other Sources of Sequences
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Lazy Sequences
    • Sequences Without End
    • More Interesting Laziness
    • Lazy Friends
    • Laziness in Practice
    • Behind the Scenes
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • Destructuring
    • Pry Open Your Data
    • Getting Less than Everything
    • Destructuring in Sequence
    • Destructuring Function Arguments
    • Digging into Maps
    • Diving into Nested Maps
    • The Final Frontier: Mixing and Matching
    • Going Further
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • Records and Protocols
    • The Trouble with Maps
    • Striking a More Specific Bargain with Records
    • Records Are Maps
    • The Record Advantage
    • Protocols
    • Decentralized Polymorphism
    • Record Confusion
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Tests
    • Spotting Bugs with clojure.test
    • Testing Namespaces and Projects
    • Property-Based Testing
    • Checking Properties
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • Spec
    • This Is the Data You’re Looking For
    • Spec’ing Collections
    • Registering Specs
    • Spec’ing Maps (Again)
    • Why? Why? Why?
    • Function Specs
    • Spec-Driven Tests
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up

Part III — Advanced

  • Interoperating with Java
    • A Peek at Java …
    • … And Back to Clojure
    • Packages
    • Class Methods and Fields
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Threads, Promises, and Futures
    • Great Power …
    • … And Great Responsibility
    • Good Fences Make Happy Threads
    • Promise Me a Result
    • A Value with a Future
    • Staying Out of Trouble
    • In the Wild
    • Wrapping Up
  • State
    • It’s Made of Atoms
    • Swapping Maps
    • Refs: Team-Oriented Atoms
    • Agents
    • Choose Wisely
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Read and Eval
    • You Got Data On My Code!
    • Reading and Evaluating
    • The Homoiconic Advantage
    • An Eval of Your Own
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up
  • Macros
    • There Are Three Kinds of Numbers in the World
    • Macros to the Rescue
    • Easier Macros with Syntax Quoting
    • In the Wild
    • Staying Out of Trouble
    • Wrapping Up

Conclusion