     (apply max [0 1 2])
     => 2))
 
+
 ;;;;;;;;;;;;;;;;
 ;; partial - takes a function an any number of arguements and returns a new function
 ;;   then when the new function is called it call the original function with the orignal

(def add-missing-element
  (partial conj ["water" "earth" "air"]))

(fact (add-missing-element "unobtainium" "adamantium")
  => ["water" "earth" "air" "unobtainium" "adamantium"])



  (take 10 (even-numbers))
  => '(0 2 4 6 8 10 12 14 16 18))

(fact "remember that 'cons' returns a new list with an element prepended to the given list"
  (cons 0 '(2 4 6))
  => '(0 2 4 6))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the collection abstraction:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; sequence is about operating on members
;; collection is about operating operating on the structure as a whole.
;;  count, empty?,every?

(facts "about empty? operating on collections"
  (fact
    (empty? [])
    => true)
  (fact
    (empty? ["no!"])
    => false))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; into
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(facts "about into"
  (fact "'map' returns a 'seq'"
    (map identity {:sunlight-reation "Glitter!"})
    => '([:sunlight-reation "Glitter!"]))
  (fact "convert 'seq' 'into' a map"
    (into {} (map identity {:sunlight-reation "Glitter!"}))
    => {:sunlight-reation "Glitter!"}))

(facts "convert back to vector"
  (fact "'map returns a 'seq'"
    (map identity [:garlic :sesame-oil :fried-eggs])
    => '(:garlic :sesame-oil :fried-eggs))

  (fact  "'into' a vector"
    (into [] (map identity [:garlic :sesame-oil :fried-eggs]))
    => [:garlic :sesame-oil :fried-eggs]))

(fact "convert back to list"
