Skip to content

Instantly share code, notes, and snippets.

@cemerick
Forked from slagyr/gist:1301638
Created October 20, 2011 17:05
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 cemerick/1301675 to your computer and use it in GitHub Desktop.
Save cemerick/1301675 to your computer and use it in GitHub Desktop.
;; no exception when declare/defn are top-level (unsurprisingly)
=> (list
(declare ^:dynamic p)
(defn q [] @p))
(#'user/p #'user/q)
=> (binding [p (atom 10)]
(q))
#<ClassCastException java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.IDeref>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment