Antonio Leitao <aml@gia.ist.utl.pt> wrote:
+---------------
| Anyway, I was concerned about other thing. My problem is that Common
| Lisp makes a clear point about not using apply when the list of
| arguments is bigger than call-arguments-limit. Scheme doesn't make
| such point (to my knowledge). How should we decide between an apply
| and a fold (in equivalent situations)?
+---------------
It's not in the standard, so I'd say you have to look in whatever
"implemention limits/restrictions", if any, are mentioned in the
doc files for the particular implementation you're using. MzScheme,
for example, doesn't mention any hard limitation, and in fact seems
quite handily to handle at least a million args in an "apply":
> (apply + (vector->list (make-vector 1000000 1.25)))
1250000.0
>
Ditto for SCM:
> (apply + (vector->list (make-vector 1000000 1.25)))
1.25e6
>
-Rob
p.s. Elk handled a 100K-arg trial, but the above 1M-args blew up after
the heap had grown to over 140 MB (dunno why)...
-----
Rob Warnock, 8L-846 rpw3@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. FAX: 650-933-0511
Mountain View, CA 94043 PP-ASEL-IA