Phillip,

Alan was talking about this on IRC yesterday with me an Alex... I think in
general you can't "just" macro this, because hand unrolling is generating
the nth duff's device by partially applying the "base" case over N elements
from the "head" of varargs. This is pretty straightforward for cases where
the varargs case is just a reduce as above but in the general case I think
you'll need a full blown partial evaluator.

For the special case of a "reduction" over varargs as in #'clojure.core/+
or #'clojure.core// where you're just generating Duff's I think the macro
should be pretty straightforward but it won't be general at all. However I
suspect that there are enough "trivial reduction" varargs functions as such
that this may well be worth exploring. If I have time I'll kick this around
some more today.

Reid

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to