store/[org.clojure/clojure "1.8.0"] clj::clojure.core/atom

Official Documentation

Add notes
Arities
==================================================
   [x]
   [x & options]

Docstring
==================================================
  Creates and returns an Atom with an initial value of x and zero or
  more options (in any order):

  :meta metadata-map

  :validator validate-fn

  If metadata-map is supplied, it will become the metadata on the
  atom. validate-fn must be nil or a side-effect-free fn of one
  argument, which will be passed the intended new state on any state
  change. If the new state is unacceptable, the validate-fn should
  return false or throw an exception.

Source

(defn atom
  "Creates and returns an Atom with an initial value of x and zero or
  more options (in any order):

  :meta metadata-map

  :validator validate-fn

  If metadata-map is supplied, it will become the metadata on the
  atom. validate-fn must be nil or a side-effect-free fn of one
  argument, which will be passed the intended new state on any state
  change. If the new state is unacceptable, the validate-fn should
  return false or throw an exception."
  {:added "1.0"
   :static true}
  ([x] (new clojure.lang.Atom x))
  ([x & options] (setup-reference (atom x) options)))

Example 1

Edit
(def my-atom (atom 0))
;; => #'user/my-atom

@my-atom
;; => 0

(swap! my-atom inc)
;; => 1

@my-atom
;; => 1

(swap! my-atom (fn [n] (* (+ n n) 2)))
;; => 4

Uses on crossclj