Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 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