[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DEFUN with &WHOLE



Re:
    Date: 1 December 1980 23:08-EST
    From: William G. Dubuque <WGD at MIT-MC>
    (defun foo ((&whole x) y) &whole) then (foo '(a b) 1) => a. But
    (defun foo (&whole x) &whole) => infinite recursion.
First, &WHOLE is supposed to have absolutely no special meaning
with DEFUN;  what happened here was that DEFUN was tricked by an
inadvertent ordering of several atom headers (as with so many
other places inthe LISP system, a test like (MEMQ X '(ATOM1 ATOM2 ...))
is done merely by ensuring that the symbol headers for ATOM1, ATOM2 etc
occupy consecutive locations, and then just doing a between-p address
comparison.  Pooor &WHOLE happened to be in the middle of some range
which it shouldn't.  I patched XLISP, and edited the source.