store/[org.clojure/clojure "1.8.0"] clj::clojure.core/ref-set

Official Documentation

Add notes
Arities
==================================================
   [ref val]

Docstring
==================================================
  Must be called in a transaction. Sets the value of ref.
  Returns val.

Source

(defn ref-set
  "Must be called in a transaction. Sets the value of ref.
  Returns val."
  {:added "1.0"
   :static true}
  [^clojure.lang.Ref ref val]
    (. ref (set val)))

Example 1

Edit
(def foo (ref {}))
;; => #'user/foo

(dosync
 (ref-set foo {:foo "bar"}))
;; => {:foo "bar"}

@foo
;; => {:foo "bar"}

Uses on crossclj