user=> (def foo (ref {})) #'user/foo user=> (dosync (ref-set foo {:foo "bar"})) {:foo "bar"} user=> @foo {:foo "bar"}
Creates and returns a Ref with an initial value of x and zero or mo
(defn ref-set "Must be called in a transaction. Sets the value of ref. Returns val." {:added "1.0"} [^clojure.lang.Ref ref val] (. ref (set val)))
Comments top
No comments for ref-set. Log in to add a comment.