Ok, so it turns out I have other issues. Args is (:keys dict) and that
doesn't evaluate
(def dict
{:key `(str "obj isn't defined in this scope" (:blah ~'obj))})
(defmacro encode [my-obj body]
`(let [~'obj ~my-obj]
~body))
(macroexpand '(encode {:blah "thingy"} (:key dict))) => (let* [code
(first json)] (:key dict))
(encode {:blah "thingy"} (:key dict)))
(clojure.core/str "obj isn't defined in this scope" (:blah obj))
The macro doesn't have the key there, I need to pass it in. So it appears
that I need to evaluate the body?what am I doing wrong here.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.