Node:SRFI-1 Deleting, Next:, Previous:SRFI-1 Searching, Up:SRFI-1



39.3.8 Deleting

The procedures for deleting elements from a list either accept a predicate or a comparison object for determining which elements are to be removed.

delete x lst [=] Scheme Procedure
delete! x lst [=] Scheme Procedure
Return a list containing all elements from lst, but without the elements equal to x. Equality is determined by the equality predicate =, which defaults to equal? if not given.

delete! is allowed, but not required to modify the structure of the argument list in order to produce the result.

delete-duplicates lst [=] Scheme Procedure
delete-duplicates! lst [=] Scheme Procedure
Return a list containing all elements from lst, but without duplicate elements. Equality of elements is determined by the equality predicate =, which defaults to equal? if not given.

delete-duplicates! is allowed, but not required to modify the structure of the argument list in order to produce the result.