We will review Clojure as a general purpose functional programming language.
Clojure is very different from imperative languages such as Java / C / Go. A Clojure program is represented entirely as a data structure.
Let survey the elements of Clojure constructs. Each programming construct is actually a fragment of Clojure’s data descriptive language.
We will look at how data is accessed and processed in Clojure. Principles of Data-driven Programming Clojure is a functional language. It’s data storage is primarily write once, read only. Construction Transformation We (almost) never modify data in-place. Managing Data Construction Definition: Construction Building a data structure from smaller pieces is known as construction. ;; A vector ["Ken" "CS" "Clojure"] ;; A hashmap {:name "Ken" :group "CS" :likes "Clojure"} ;; A set #{ :red :green :blue } ;; A list (note the quote) '("Ken" "likes" "Clojure") Destructure Definition: Destructure The process of extracting smaller constituents from a data structure is known as destructure.
Let’s look at the interplay of Clojure data structure and its control logic. Recursion