Yes, it was working as a reader macro and messing me up. Using
hashmap worked. Thanks.
On Feb 3, 8:03 pm, "Stephen C. Gilardi" wrote:
> On Feb 3, 2009, at 7:45 PM, Jeffrey Straszheim wrote:
>
> > Btw, I fixed the ~ needed on relation. It didn't help. It seems I
> > just can't put a ~@ form i
On Feb 3, 2009, at 7:45 PM, Jeffrey Straszheim 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.
{ } reads a literal map. It appears to expect an even number arguments
between the curly braces at read time. You c
This works for me:
(def wrap-var)
(defmacro datalog-term
"Builds a term"
[relation & formals]
(let [wrapped-formals (map wrap-var formals)]
`(struct rule ~relation (hash-map ~...@wrapped-formals
ie: using (has-map ...) instead of {}
I believe this is because {} is handled at the re
Thanks.
On Feb 3, 7:55 pm, David Nolen wrote:
> {} 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 <
>
> straszheimjeff...@gmail.com>
{} 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 <
straszheimjeff...@gmail.com> wrote:
>
> Btw, I fixed the ~ needed on relation. It didn't hel
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
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