In Clojure to address concurrency issues we can use an atom to write:
user=> (def my-atom (atom 0))
#'user/my-atom
user=> @my-atom
0
user=> (swap! my-atom inc)
1
user=> @my-atom
1
user=> (swap! my-atom (fn [n] (* (+ n n) 2)))
4
We know that this (in the Clojure implementation) is a wrapper around the Java Atomic object.
Interestingly enough, Atoms are replicated in ClojureScript, at a Syntactic level - even though JavaScript runtimes don't have an Atomic reference.
My question is, How are Atoms implemented in Clojurescript? Are they just an object Wrapper?