Ah! Thanks a lot, MichaĆ -- that clarifies a lot for me.
Best regards,
Ingolf
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be pat
Hi again --
First, let me thank all of you for you kind and instructive comments.
Kent: thanks for the explanation of the relationships between reader
and macro expansion.
Patrick & Meikel: thanks! Your solutions do produce almost what I
need; the idea is with
(tm a b)
I should get back
{:a a
Hello --
I am trying to gain a better understanding of Clojure's macro
language.
The output I am aiming for (and which is to be used as code in another
macro) is as follows:
{:a a :b b :c c :d d}
The attempt I made is as follows:
(defmacro tm [& args]
`{~@(mapcat (fn [x] (list (keyword x) x)