On Nov 23, 4:03 am, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Am 23.11.2008 um 02:29 schrieb James Reeves:
>
> >> (defn make-person [name age]
> >> (assoc (struct person name age person) :type person))
>
> > Maybe you could roll this into a macro:
>
> > (defmacro struct*
> > [type & params]
> > `(assoc (struct ~type [EMAIL PROTECTED]) :type ~type))
>
> Why? A function does the same. There is no need for a macro.
The general point: all arguments to the macro are used only
after being evaluated - i.e., the same thing a function would do.
> Sorry for being the nit-picker.
Ditto, for me.
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---