Summary
We have explored how metaprogramming is possible with Clojure in this chapter. We discussed how code is read, macroexpanded, and evaluated, as well as the various primitive constructs that implement these operations. Macros can be used to encapsulate patterns in code, as we demonstrated in the various examples in this chapter. Toward the end of the chapter, we also talked about reader conditionals and pointed out the various complications that arise with the use of macros.
In the following chapter, we will explore how transducers can be used to process any data regardless of the source of the data.