Subject: Re: checking for duplicate elements
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 30 Apr 2009 22:02:16 -0500
Newsgroups: comp.lang.lisp
Message-ID: <jtudnQ4M5sql-2fUnZ2dnUVZ_gOdnZ2d@speakeasy.net>
Madhu <enometh@meer.net> wrote: +--------------- | (let ((n (mismatch seq1 (remove-duplicates seq1)))) ... | The use of mismatch idea was suggested by Anon.C.Lisper elsewhere in | this thread. +--------------- IIUIC, you don't need the overhead of full MISMATCH here, (NOT (EQUAL ...)) should work just as well, e.g.: (let ((n (not (equal seq1 (remove-duplicates seq1))))) ...) -Rob ----- Rob Warnock <rpw3@rpw3.org> 627 26th Avenue <URL:http://rpw3.org/> San Mateo, CA 94403 (650)572-2607