Last active
March 25, 2017 17:43
-
-
Save sw-samuraj/1cca7c6e808bf2ad507f06fa5c3b05c1 to your computer and use it in GitHub Desktop.
An example of Var re-binding (static).
This file contains 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
(def static-var "static var") | |
static-var | |
;; -> "static var" | |
(binding [static-var "re-binded var"] static-var) | |
;; -> IllegalStateException Can't dynamically bind non-dynamic var: | |
;; user/static-var clojure.lang.Var.pushThreadBindings (Var.java:320) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment