remove-duplicates returns a modified copy of sequence
from which any element that matches another element occurring in
sequence has been removed.
If sequence is a vector, the result is a
vector that has the same
actual array element type as sequence.
If sequence is a list, the result is a list.
delete-duplicates is like remove-duplicates,
but delete-duplicates may modify sequence.
The elements of sequence are compared pairwise, and if any two match,
then the one occurring earlier in sequence
is discarded, unless from-end is true, in which case the one
later in sequence is discarded.
remove-duplicates and delete-duplicates
return a sequence of the same type as
sequence with enough elements removed so that no two of the remaining
elements match. The order of the elements remaining in the result
is the same as the order in which they appear in sequence.
remove-duplicates returns a sequence
that may share
with sequence or may be identical to sequence
if no elements need to be removed.
delete-duplicates, when sequence is a list,
is permitted to setf any part, car or cdr,
of the top-level list structure in that sequence.
When sequence is a vector, delete-duplicates
is permitted to change the dimensions of the vector
and to slide its elements into new positions without
permuting them to produce the resulting vector.