On Tue, Feb 4, 2014 at 7:14 AM, Devon Sean McCullough <SBCL-user@jovi.net> wrote:
> I'm just reading the chapter in PCL (Peter Seibel) which deals with
> apply and funcall. So why not write
>  (defun doall ()  (apply #'doit (2009 2010 2011 2012 2013 2014)))
> or
>  (defun doall ()  (funcall #'doit 2009 2010 2011 2012 2013 2014))

Not apply nor funcall but map:

* (defun doall () (apply #'doit (2009 2010 2011 2012 2013 2014)))       ;       illegal function ...
* (defun doall () (funcall #'doit 2009 2010 2011 2012 2013 2014))       ;       The function was called with six arguments ...
* (defun doall () (map nil #'doit '(2009 2010 2011 2012 2013 2014)))    ;       correct

I appreciate the suggestions for alternate codings, but I'm really more interested in why the program crashes when I make those calls procedurally but not when I make the same calls from the REPL.

-- Scott