{} is a reader macro for hash-map I believe, try something like this:
(defmacro foobar [& rest]
`(hash-map ~...@rest))
(foobar :first 1 :second 2)
On Tue, Feb 3, 2009 at 7:45 PM, Jeffrey Straszheim <
[email protected]> wrote:
>
> Btw, I fixed the ~ needed on relation. It didn't help. It seems I
> just can't put a ~@ form inside of a { } set builder.
>
> On Feb 3, 7:43 pm, Jeffrey Straszheim <[email protected]>
> wrote:
> > I'm trying to define a macro:
> >
> > http://paste.pocoo.org/show/102695/
> >
> > But whenever I try to compile it I get:
> >
> > java.lang.ArrayIndexOutOfBoundsException: 1
> > java.lang.Exception: Unmatched delimiter: )
> > java.lang.Exception: Unmatched delimiter: )
> >
> > Note, this is when compiling the macro itself, not executing it. I
> > don't understand.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---