Forms
Clojure is homoiconic,[16] which is to say that Clojure code is composed of Clojure data. When you run a Clojure program, a part of Clojure called the reader reads the text of the program in chunks called forms and translates them into Clojure data structures. Clojure then compiles and executes the data structures.
The Clojure forms covered in this book are summarized in the following table.
FormExample(s) | Primary Coverage |
---|---|
Boolean true, false | |
Character \a | |
Keyword :tag, :doc | |
List (1 2 3), (println "foo") | Chapter 3, Unifying Data with Sequences |
Map {:name "Bill", :age 42} | |
Nil nil | |
Number 1, 4.2 | |
Set #{:snap ... |
Get Programming Clojure, 2nd Edition 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.