Re: Detele repeated in a list



Pascal Costanza <pc@xxxxxxxxx> writes:

Alexandre Almeida wrote:
Yes, I have... But i need to build that function, for a school work :(

(defun rem-duplicates (list)
(loop for (first . rest) on (append list list)
unless (member first (reverse rest) :test #'equal)
collect first))

That's slightly evil.
<insert maniacal laughter>

--
Thomas A. Russ, USC/Information Sciences Institute








.



Relevant Pages