Created
January 7, 2020 00:57
-
-
Save allenyang79/e54822488be25e51b2cae3b55694566a to your computer and use it in GitHub Desktop.
clojure-cheetsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; declare a atom var | |
(def x (atom 5)) | |
; get value of atom | |
@x | |
; change atom's value | |
(swap! x inc) | |
; reset | |
(reset! x 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment