Possible Duplicate:
In Lisp, how many inputs can the + function actually have?
The following code gives a “too many argument” error:
(setf u (loop for i upto 50000 collect 1))
(apply #'+ u)
similarly for
(apply #'= u)
So I guess when writing defun with &rest there is an upper bound for the number of arguments. What is it? I searched and tried here and various pages on that site but I couldn’t figure this out.
There is a constant called CALL-ARGUMENTS-LIMIT that gives you the upper bound of how many arguments you can pass to a function.
However, in your initial example, you can definitely use REDUCE: