Andy Freeman <email@example.com> wrote:
| BTW - addition is conceptually nary. Thus, the (reduce #'+ values)
| should be (apply #'+ values).
Even if (> (LENGTH VALUES) CALL-ARGUMENTS-LIMIT)???
No, I thought not. ;-}
Rather, what we really need is for implementors to add the :MAX-ARGS
keyword as an extension to REDUCE so that it can act like the Unix
shell command "xargs", that is, allow things like this:
(REDUCE #'+ VALUES :MAX-ARGS 35)
which would internally APPLY the function argument successively
to length 34 (to account for the accumulated intermediate result)
subsequences of the sequence arg.
[Note: ":MAX-ARGS T" should probably mean "MAX-ARGS CALL-ARGUMENTS-LIMIT".]
[Note#2: I say "implementors", since while one could write a MY-REDUCE
that took such a :MAX-ARGS keyword and "did the right thing", it would
probably be much more efficient if were implemented in the base system.]
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607