Produces a map of the names of local bindings to their values.
For now, strip out gensymed locals. TODO: use 1.2 feature.
(defmacro local-bindings
"Produces a map of the names of local bindings to their values.
For now, strip out gensymed locals. TODO: use 1.2 feature."
[]
(let [symbols (remove #(.contains (str %) "_") (map key @clojure.lang.Compiler/LOCAL_ENV))]
(zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols)))
Comments top
No comments for local-bindings. Log in to add a comment.