clojure – Define an atom

To define an atom, use an ordinary def, but add an atom function before it, like so:

(def counter (atom 0))

This creates an atom of value 0. Atoms can be of any type:

(def foo (atom "Hello"))
(def bar (atom ["W" "o" "r" "l" "d"]))

if you want to reproduce, please indicate the source:
clojure – Define an atom - CodeDay