0.0.12 permalink Arrow_down_16x16

local-bindings

circumspec.should

  • (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.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source circumspec/should.clj:8 top

(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)))
Vars in circumspec.should/local-bindings: defmacro fn let map zipmap concat list seq
Used in 0 other vars

Comments top

No comments for local-bindings. Log in to add a comment.