vswap!

macrosince v0.0-2496 clojure.core/vswap!Edit
(vswap! vol f & args)

See Also:


Source docstring:
Non-atomically swaps the value of the volatile as if:
(apply f current-value-of-vol args). Returns the value that
was swapped in.
Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro vswap!
  [vol f & args]
  `(-vreset! ~vol (~f (-deref ~vol) ~@args)))