   ([price]
    (* price 10)))
 
+(defn greeting
+  ([] (greeting "Hello" "world"))
+  ([name] (greeting "Hello" name))
+  ([salutation name] (str salutation ", " name "!")))
 
-;; Dynamic Binding
+;; Variadic
 
-(def ^:dynamic *evalme* 10)
+(defn average
+  ([x] x)
+  ([x y] (/ (+ x y) 2))
+  ([x y & extra] (/ (reduce + (+ x y) extra)
+                    (+ 2 (count extra)))))
 
-(binding [*evalme* 20]
-  (str "hello" *evalme*))
+;; Destructuring
 
-(str "hello" *evalme*)
+(defn printer [& {name :name
+                  [hole1 hole2] :scores}]
+  {"name" name "hole1" hole1 "hole2" hole2})
+
+(comment
+  (printer :name "Joey" :scores [42 18]))


(apply max [1 2 3])


;; Regular Functions

(defn foo [str]
  (println "hello " str))

(defn total
  ([price qty]

(ns ^{:doc "All about functions and their scope"}
    functions.core)


;; Apply: the ultimate function!

(apply str ["hello" " " "world"])

