Kent M Pitman <firstname.lastname@example.org> wrote:
| Peter Seibel <email@example.com> writes:
| > >>>>> "Kalle" == Kalle Olavi Niemitalo <firstname.lastname@example.org> writes:
| > Kalle> (multiple-value-call #'values (funcall fn) warning)
| > Duh. Thanks.
| I recommend instead:
| (values (multiple-value-list (funcall fn)) warning)
| The problem is otherwise that if fn has a variable number of
| return values, you'll confuse it.
One thing that would help with Kalle's version would be to change
the protocol for SAFE-FUNCALL (or whatever the name was) to swap
the position of the warning/error return value with the function's
(multiple-value-call #'values warning (funcall fn))
thus removing the ambiguity. The first value is then *always*
an error-p, and the remaining however-many values (if any) come
from the called function.
Rob Warnock, PP-ASEL-IA <email@example.com>
627 26th Avenue <URL:http://www.rpw3.org/>
San Mateo, CA 94403 (650)572-2607