Shameless self-promotion: https://github.com/brandonbloom/backtick
On Tuesday, February 19, 2013 1:35:28 PM UTC-5, AtKaaZ wrote:
>
> I am trying (but failing) to find a way to have a macro like:
> => *(xmacro* {:a (+ 1 2) :b ~(+ 1 3)})
> {:a (clojure.core/+ 1 2), :b 4}
> ;*without specifying the b
bbloom on irc suggested this: https://github.com/brandonbloom/backtick
and looks like *template *is the macro I was looking for
=> (template {:a (+ 1 2) c d :b ~(+ 1 3)})
{:a (+ 1 2), :b 4, c d}
Totally awesome!
On Tue, Feb 19, 2013 at 7:35 PM, AtKaaZ wrote:
> I am trying (but failing) to find
Not sure if it is exactly what you are looking for, but that looks fairly
similar to how string interpolation works:
https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/strint.clj
Maybe you can somehow make that work for you?
On Tue, Feb 19, 2013 at 1:35 PM, AtKa
I am trying (but failing) to find a way to have a macro like:
=> *(xmacro* {:a (+ 1 2) :b ~(+ 1 3)})
{:a (clojure.core/+ 1 2), :b 4}
;*without specifying the backquote ` on the input*
I need it to behave like this:
=> (*eval '`*{:a (+ 1 2) :b ~(+ 1 3)})
{:a (clojure.core/+ 1 2), :b 4}
But I don't