                        :address {:line-1 "78 Green Lane"
                                  :line-2 "New Town"}})
 
+(swap! my-map-atom assoc-in [:address :line-1] "780 Green Lane")
+(fact @my-map-atom => {:first-name "Bob"
+                       :address {:line-1 "780 Green Lane"
+                                 :line-2 "New Town"}})
+
 ;;;; ___________________________________________________________________________
-;;;; `compare-and-set!`
+;;;; Atoms: `compare-and-set!`
 
 (fact @my-number-atom => 64)
 (fact (compare-and-set! my-number-atom 99 42) => false)

;;;; References
;;;; - There are a fair few types of reference.
;;;;   - atoms, refs, vars, agents, promises, futures...
;;;; - Some are for managing state.
;;;; - Some are for managing concurrency.
;;;; - Some combine the two.

;;;; Here we will look at two reference types, both for managing state
;;;; - Atoms
;;;; - Refs (confusing names! A ref is one kind of reference.)


(fact @my-number-atom => 64)


;;;; Maps in atoms

(def my-map-atom (atom {}))

