 (def m {:a 1, :b 2, :c 3})
 
 (facts "'assoc' and 'dissoc' are a more natural fit then 'conj' ans 'seq'"
-  (fact (get m :b)
+  (fact
+    (get m :b)
     => 2)
-  (fact (get m :d)
+  (fact "missing value"
+    (get m :d)
     => nil)
-  (fact (get m :d "not-found")
+  (fact "default value"
+    (get m :d "not-found")
     => "not-found")
-  (fact (assoc m :d 4)
+  (fact
+    (assoc m :d 4)
     => {:c 3, :b 2, :d 4, :a 1})
-  (fact (dissoc m :b)
+  (fact
+    (dissoc m :b)
     => {:c 3, :a 1}))
 
 (facts "'assoc' and 'dissoc can be used for mutiple entries"

    (dissoc m :a :c)
    => {:b 2}))


(def v [1 2 3])

(facts "'get' and 'assoc' are supported by vectors:"
  (fact (get v 1)
    => 2)
  (fact (get v 10)
    => nil)
  (fact (get v 10 "not-found")
    => "not-found")
  (fact (assoc v
          1 4
          0 -12
          2 :p)
    => [-12 4 :p]))

(fact "can add but need to remember what the new index will be:"
  (assoc v 3 10)
  => [1 2 3 10])

(facts "'get' works on sets - the key is the value"
  (fact (get #{1 2 3} 2)
    => 2)
  (fact (get #{1 2 3} 4)
    => nil)
  (fact (get #{1 2 3} 4 "not-found")
    => "not-found"))


(fact "sets can be used like a conditional\"\""
  (when (get #{1 2 3} 2)
    "it contains '2'!")
  => "it contains '2'!")

(facts "'contains?' is a predicate that returns 'true' if a collection contains a key"
  (fact (contains? [1 2 3] 0)
    => true)
  (fact (contains? {:a 5 :b 6} :b)
    => true)
  (fact (contains? {:a 5 :b 6} 42)
    => false)
  (fact (contains? #{1 2 3} 1)
    => true))

[[:subsection {:title "Indexed --  page: 103"}]]

[[:subsection {:title "Stack --  page: 104"}]]

[[:subsection {:title "Set --  page: 105"}]]


[[:subsection {:title "Sorted --  page: 106"}]]

[[:section {:title "Concise Collection Access --  page: 111"}]]



[[:section {:title "In Summary --  page: 157"}]]

(fact "really??"
  (+ 3 4) => 7)
