Clojure Concurrency Tutorial
Let’s look at the arguments:
takes the current value of the Atom, calls the function on it (in this case, ), and sets the new value. If multiple threads are swapping to an Atom at the same time, order is out of the window. Atoms give you a very important guarantee: you can look at the current value of the Atom (with ) at any time and know that, at that time, the value was current.
Source: purelyfunctional.tv