Chapter 1
Build 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, so it’s best to use that version when you type them into your REPL (though other versions are likely to work just fine as well).

If you’ve done a decent amount of Clojure, some of this chapter will be review, but there should be some new ways of thinking about things for all but the most erudite of macro scholars.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.86.211