Hi,

see http://paste.pocoo.org/show/227866/

You just have to write your macro so that it expands into multiple
defs. Remember, macros work at compile time, so they are not the same
as eval. And from your code, I could not see your intentions, your
prepare-2 macro seems somehow wrong to me. Maybe instead of (get ~m
1), you actually want the result of getting the value: ~(get m 1) in
the macro.

The bug with evaling records has been filed here:
http://www.assembla.com/spaces/clojure/tickets/385-make-records-to-evaluate-to-themselves

Feel free to ask or drop into #clojure if you're having more
questions.

regards,
Erik

On 19 Jun., 14:56, Oscar Forero <oscar.for...@computer.org> wrote:
> Hello,
>
> I am working with Clojure for a university project and hit this
> problem
>
> http://paste.pocoo.org/show/227239/
>
> I am trying to defines symbols from a map with keywords as keys and X
> as value (where X is usually a lambda or a Record), the first example
> does that ...
>
> (binder data)
>
> Creates the definitions but the record loose the Record type
> information.
>
> Using a macro works but I can not operated on the whole collection,
> have tried multiple options including doseq but all hit different
> issues.
>
> From the chat it seems that a record evals to map and is the reason
> why the function approach fails (thx AWizzArd). Is this intended or
> did I just hit an under construction sign?
>
> Any suggestions?
>
> best regards,
>
> Oscar

-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to