O'Reilly logo

Mastering Clojure Macros by Colin Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1Build a Solid Foundation

Over the course of this book you’re going to learn how and when to write macros in Clojure, but first you need to make sure the fundamentals are in place. In this chapter, you’ll see how reading, quoting, and macroexpansion work. Don’t worry—you won’t have to wait long before you get to write some simple macros. You’ll also see some built-in tools that Clojure provides developers for investigation when macros misbehave.

You don’t need a lot of setup to get started: just the REPL will do for now. If you don’t have Leiningen[7] installed, I suggest you go ahead and do that now, since it’s one of the easiest ways to use Clojure and comes with a nice REPL[8] built in. The examples in this book assume Clojure 1.6.0, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required