What’s in This Book?

Chapter 1, Build a Solid Foundation introduces the basic building blocks that will allow you to understand how macros work and what kinds of things it’s possible to do with them.

Chapter 2, Advance Your Macro Techniques shows how and why to use syntax-quoting, unquoting, and gensyms. These are some the trickiest concepts for new macro writers, but also some of the most useful.

Chapter 3, Use Your Powers Wisely takes a step back to dig into some of the problems macros can create, and how you can avoid those problems.

Chapter 4, Evaluate Code in Context starts the field guide portion of the book, and covers the first main use case you see in the wild: wrapping a block of code in a context for its execution.

Chapter ...

Get Mastering Clojure Macros now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.