The document discusses functional programming from a Clojurian perspective. It provides an overview of Clojure syntax including lists, vectors, maps, and sets. It also covers Clojure concepts like homoiconicity, where code is represented as data in lists. Functions are first-class citizens in Clojure and functions can be defined, consumed, and are used throughout the language to process data.
9. Clojure Syntax
;lists - these are special
'(+ 1 2 1/3)
;a comment
["this" "is" "a" "vector"]
;commas are whitespace
{:yes true, :no false, :null nil}
;sets
#{a e i o u}
10. Clojure Syntax
;lists - these are special
'(+ 1 2 1/3)
;a comment
["this" "is" "a" "vector"]
;commas are whitespace
{:yes true, :no false, :null nil}
;sets
#{a e i o u}
11. Clojure Syntax
;lists - these are special
'(+ 1 2 1/3)
;a comment
["this" "is" "a" "vector"]
;commas are whitespace
{:yes true, :no false, :null nil}
;sets
#{a e i o u}
12. Clojure Syntax
;lists - these are special
'(+ 1 2 1/3)
;a comment
["this" "is" "a" "vector"]
;commas are whitespace
{:yes true, :no false, :null nil}
;sets
#{a e i o u}
13. Clojure Syntax
;lists - these are special
'(+ 1 2 1/3)
;a comment
["this" "is" "a" "vector"]
;commas are whitespace
{:yes true, :no false, :null nil}
;sets
#{a e i o u}
14. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))
15. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))
16. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))
17. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))
18. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))
19. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))
20. LISt Processing
;can be a regular function
;Yes! + is a function :)
(+ 1 2 3)
;or a special form
(if (< x 3) "less than 3" "or not")
;or a macro
(defn say-hello [name]
(str "Hello, " name))