Elements of Clojure by Zachary Tellman [Leanpub PDF/iPad/Kindle]
Elements of Clojure
Elements of Clojure
Elements of Clojure

This book is 65% complete

Last updated on 2017-09-27

About the Book

This is a work in progress.  There are drafts available for three out of four chapters. The first chapter can be read for free.


This book was conceived as "the best second book to read about Clojure". Along the way, it became an exploration of why software design is an intractable problem.

These are not as unrelated as they may seem. Beginners can easily learn all the things that Clojure makes possible, but when they try to build something, they often get tangled up in their own indecision. There are countless paths to their goal, and no way to tell which one is "right".

Some questions can be answered without any understanding of the problem that is being solved. These sorts of answers are often found in style guides. For everything else, a book can only offer concepts and methods that the reader, using their domain expertise, can apply to the problem at hand. But this will not reveal a single, optimal approach.

In Notes on the Synthesis of Form, Christopher Alexander observes that there is no obvious definition for "good fit" other than the absence of "bad fit". There is no right approach to a design problem, but there are many wrong approaches. Towards this end, Elements of Clojure explores the many ways that our software can fail to be useful.

Some of these are specific to Clojure, but most are not. Readers who have no particular interest in Clojure, but want a better framework for judging names and abstractions, may still find this book valuable

The first chapter, Names, explains why names define the structure of our software, and how to judge whether a name is any good.

The second chapter, Idioms, provides specific, syntactic advice for writing Clojure which is clean and readable.

The third chapter, Indirection, looks at how code can made simpler and more robust through separation.

The final chapter, Composition, explores how the constituent pieces of our code can be combined into an effective whole.


If you'd like to discuss the book, visit the mailing list.

  • Share this book

About the Author

Zach Tellman
Zachary Tellman

Zach writes code and sometimes not-code. He is currently working on a tool for exploratory analysis of streaming data. He has approximate knowledge of many things.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub