permalink Arrow_down_16x16

eval-with-locals

clojure.contrib.base64

  • (eval-with-locals locals form)
Evals a form with given locals. The locals should be a map of symbols to
values.

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 clojure/contrib/debug.clj:20 top

(defn eval-with-locals
  "Evals a form with given locals. The locals should be a map of symbols to
values."
  [locals form]
  (binding [*locals* locals]
    (eval
     `(let ~(vec (mapcat #(list % `(*locals* '~%)) (keys locals)))
        ~form))))
Vars in clojure.contrib.base64/eval-with-locals: binding defn eval keys list mapcat vec concat let seq
Used in 0 other vars

Comments top

No comments for eval-with-locals. Log in to add a comment.