Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active March 25, 2017 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sw-samuraj/1cca7c6e808bf2ad507f06fa5c3b05c1 to your computer and use it in GitHub Desktop.
Save sw-samuraj/1cca7c6e808bf2ad507f06fa5c3b05c1 to your computer and use it in GitHub Desktop.
An example of Var re-binding (static).
(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