Clojure's Atom implementation in JavaScript