 ;;;; ___________________________________________________________________________
 ;;;; Atoms: `compare-and-set!`
 
-(fact @my-number-atom => 64)
+(fact @my-number-atom => 82)
 (fact (compare-and-set! my-number-atom 99 42) => false)
-(fact @my-number-atom => 64)
+(fact @my-number-atom => 82)
 
-(fact (compare-and-set! my-number-atom 64 42) => true)
+(fact (compare-and-set! my-number-atom 82 42) => true)
 (fact @my-number-atom => 42)
 
 ;;;; ___________________________________________________________________________

  (:require [midje.sweet :refer :all]))

;;;; ___________________________________________________________________________

;;;; Concurrency and state management without locks.
;;;; Focus on sane management of state.
;;;; Sane concurrency follows.

;;;; References
;;;; - There are a fair few types of reference.


;;;; Supplying args to the swap function:

(swap! my-number-atom + 10) ; (+ 2 10)
(fact @my-number-atom => 12)

(swap! my-number-atom + 10) ; (+ 12 10)
(fact @my-number-atom => 22)

(swap! my-number-atom + 10 20 30) ; (+ 22 10 20 30)
(fact @my-number-atom => 82)


;;;; Maps in atoms
