On Mon, Nov 2, 2009 at 12:34 PM, Stuart Sierra
<[email protected]>wrote:

> On Oct 31, 12:37 pm, John Harrop <[email protected]> wrote:
> > For some reason though changing "defmacro" here to "definline" doesn't
> work.
> > It says
> >
> > #<CompilerException java.lang.Exception: Unable to resolve symbol: & in
> this
> > context (NO_SOURCE_FILE:129)>
>
> definline doesn't support variable arities.


As in, deliberately? Why would that be? Both normal functions and macros do,
and a definline is basically a self-wrapping macro, so

(definline foo ...)

(foo x y z)

has he latter behave the same as if we had (defmacro foo ...) instead, but
(map foo x y) works because a foo function exists as if we had (defn foo* [x
y z] (foo x y z)) and had used foo* in map.

Moreover we have some clojure.core functions like + that are inlined for
some arities and have & rest arguments.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to