Returns a sequence without duplicates, possibly modifying the sequence.
test is the function used to determine whether one element is a duplicate of another. The test argument may be non-commutative; it will always be called with its arguments in the same order as they appear in source-sequence.
The result-sequence may or may not be freshly allocated, may or may not share structure with the source-sequence, and may or may not be == to the source-sequence. The source-sequence may or may not be modified by the operation.
define variable *menu* = #("spam", "eggs", "spam",
"sausage", "spam", "spam")
remove-duplicates! (*menu*, test: \=)
⇒ #("spam", "eggs", "sausage")
or
⇒ #("eggs", "spam", "sausage")
or
⇒ #("eggs", "sausage", "spam")
*menu*
⇒ {undefined}open
| source-sequence | An instance of <sequence>. |
| test: | An instance of <function>. The default is ==. |
| result-sequence | An instance of <sequence>. |