So I'm finding myself writing macros that look like this
(defmacro set-from-map [objform valmapform & set-pairs]
(let [obj (gensym)
valmap (gensym)]
`(let [~obj ~objform
~valmap ~valmapform]
(other stuff happens here))))
Those top two lets are basically just letting me make obj and valmap strict -- making them evaluate
(
Read more... )
Comments 2
Reply
The reason I couldn't just use the foo# form is that I had a syntax quote embedded in some code spliced into another syntax quote, and I couldn't "see" gensyms created in the outer syntax quote from the inner syntax quote.
Reply
Leave a comment