remove duplicates from a string or (using eql) a list
Major Section:  PROGRAMMING

Remove-duplicates returns the result of deleting duplicate elements from the beginning of the given string or true list, i.e., leaving the last element in place. For example,

(remove-duplicates '(1 2 3 2 4))
is equal to '(1 3 2 4).

The guard for Remove-duplicates requires that its argument is a string or a true-list of eqlablep objects. It uses the function eql to test for equality between elements of its argument.

Remove-duplicates is a Common Lisp function. See any Common Lisp documentation for more information. Note that we do not allow keyword arguments (such as test) in ACL2 functions, in particular, in remove-duplicates. But see remove-duplicates-equal, which is similar but uses the function equal to test for duplicate elements.