[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing optional arguments?
    From: David C. Plummer <DCP@QUABBIN.SCRC.Symbolics.COM>
    Subject: Fixing optional arguments?
    and somebody calls it with B or C being the value of unsupplied-...  That
    means I would have to put a prelude function in that looks roughly like
No you wouldn't have to put such a prelude.  As soon as function call sees the
value of unsupplied-optional-argument it drops the rest of the arguments on
the floor.
	(multiple-value-call #'bar
	  arg-1 arg2
	  (if <something>
	      (values)
	      (values arg-3 arg-4)))
I don't see that as being much easier than saying:
   (if <something>
     (foo arg-1 arg-2)
     (foo arg-1 arg-2 arg-3 arg-4))