Sujet : Re: Faster remove-duplicates with sorted list.
De : sgonedes1977 (at) *nospam* gmail.com (steve g)
Groupes : comp.lang.lispDate : 10. Aug 2024, 19:13:19
Autres entêtes
Message-ID : <8734ncfdq8.fsf@gmail.com>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13)
Joerg Mertens <
joerg-mertens@t-online.de> writes:
Tested with GNU Clisp:
>
[3]> (uniquify-sorted-list '(a b b c d d e f f f g))
(A B C D E F G)
[4]> (uniquify-sorted-list '(2 2 3 4 4 4 5 5 6 7))
(2 3 4 5 6 7)
[5]> (uniquify-sorted-list '(2 2 3 4 4 4 5 5 6 7) :test #'=)
(2 3 4 5 6 7)
(remove-duplicates '(1 2 3 2 5 a 2) )