nremove
nremove — removes list items, destructively altering the list.
nremove (s_exp, list, use_equal?)
s_expAny Gamma or Lisp expression.
listA list.
use_equalIf non-nil,
use equal instead of
eq for comparison.
The list with any elements which are eq (or equal
if specified) to s_exp destructively removed.
This function removes all occurrences of the s_exp
within the given list and destructively alters the list to reduce its size
by one for each occurrence. The default comparison used is eq. If the first
argument is removed, then the return value will be (cdr list) with all other
occurrences of s_exp destructively removed.
Gamma>y = list (#a, #b, #c);(a b c)Gamma>nremove (#b, y);(a c)Gamma>x = list(1,2,3,4,5,6);(1 2 3 4 5 6)Gamma>nremove(3, x);(1 2 3 4 5 6)Gamma>nremove(3, x, t);(1 2 4 5 6)Gamma>y = list(1,2,3,4,1,2,3,4,1,2);(1 2 3 4 1 2 3 4 1 2)Gamma>nremove (1,y,t);(2 3 4 2 3 4 2)Gamma>