4 ms·
If you happen to know the sequence is a list then might as well (apply #'min '(1 2 3 4 5)) instead of (reduce #'min '(1 2 3 4 5)). I'm sure the author is aware
by araxima 15y ago
If you happen to know the sequence is a list then might as well (apply #'min '(1 2 3 4 5)) instead of (reduce #'min '(1 2 3 4 5)).
I'm sure the author is aware of that, but a reader might get the impression that #'min can only take two arguments.
- sedachv 15y agoApply has the problem in that Common Lisp allows compilers to restrict the number of arguments passed to a function to a small value (specified by call-arguments-limit: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/convar_call-a_uments-limit.html http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec...).
- deleted 15y ago[deleted]