Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this section, we’ll examine several constructs that are part of the Clojure language. Most of those that we discuss here are categorized as structural forms because they lend structure to the code; they set up local names, allow for looping and recursion, and the like. We’ll begin with the most fundamental aspect of structuring Clojure code, namely the function.
Clojure is a functional language, which means that functions are first-class citizens of the language. In other words, functions can be created dynamically, be passed as arguments to other functions, can be returned from other functions, and can be stored as values inside other data structures. Clojure functions comply with all of the above.