Skip to content

Instantly share code, notes, and snippets.

@knjname
Last active December 20, 2015 11:19
Show Gist options
  • Select an option

  • Save knjname/6122874 to your computer and use it in GitHub Desktop.

Select an option

Save knjname/6122874 to your computer and use it in GitHub Desktop.
(declare ^:dynamic *asdf*)
(let
[b (binding [*asdf* 10]
(for [i (range 0 3)]
(* *asdf* i)))]
b)
;;; => java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to java.lang.Number
(let
[b (binding [*asdf* 10]
(doall (for [i (range 0 3)]
(* *asdf* i))))]
b)
;;; (0 10 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment