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


The old ILISP DREMOVE would do what you want, but the consensus was
that the destructive alteration of the list was too unpredicatable.
Besides, there is absolutely no way for (DEL! EQ 'A SHOW) to turn
SHOW to () if it initially was (A).  Hence, you have to write
in general anyway.

I have a fondness for loops like this:
   (DO ((L SHOW (CDR L)))
       ((NULL L))
     (COND ((some-test (CAR L))
            (SET SHOW (DEL! EQ (CAR L) SHOW)))   ))
This will work with the current DEL!, but it will not work with the
old DREMOVE.  The implementors have not given us a guarantee that
DEL! will work properly, but they probably could without any risk.

If there are several pointers to the list, and you absolutely have to
be able to destructively alter the list no matter where it is accessed\n from, then you must use a headed list, whose CAR is ignored by everyone
interested in its elements.