macro | since v0.0-2496 | clojure.core/vswap! | Edit |
(vswap! vol f & args)
Non-atomically swaps the value of the volatile as if: (apply f current-value-of-vol args). Returns the value that was swapped in.
(core/defmacro vswap!
[vol f & args]
`(-vreset! ~vol (~f (-deref ~vol) ~@args)))