Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
3
Task/History-variables/Clojure/history-variables.clj
Normal file
3
Task/History-variables/Clojure/history-variables.clj
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(def a (ref 0))
|
||||
(def a-history (atom [@a])) ; define a history vector to act as a stack for changes on variable a
|
||||
(add-watch a :hist (fn [key ref old new] (swap! a-history conj new)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue