Clojure Programming notes

Submitted by code_admin on Wed, 07/25/2018 - 15:50

Set new atom value

  1. (defn set-new-atom-value [atom newval] (
  2.   swap! atom (fn [arg1 arg2] arg2) newval)
  3. )
  4.  
  5. ;Above NOT NEEDED, use reset (set-new-atom-value is the same)

Tags

RJM Article Type
Quick Reference