Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!npeer.as286.net!npeer-ng0.as286.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "B. Pym"
Newsgroups: comp.lang.lisp
Subject: Re: Detele repeated in a list
Date: Sun, 21 Jul 2024 00:21:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID:
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Sun, 21 Jul 2024 02:21:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7b0a8e365f2abfcb427a2f6d66b0136c";
logging-data="3963321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++QCp5ffcpkwrp8UFjPq04"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:JTtq+QFzewkA7jLvKD5Yat57g70=
Bytes: 1442
B. Pym wrote:
> Pascal Costanza wrote:
>
> > (defun rem-duplicates (list)
> > (loop for (first . rest) on (append list list)
> > unless (member first (reverse rest) :test #'equal)
> > collect first))
>
> Gauche Scheme
>
> (define (rem-dups lst)
> (fold
> (lambda (x accum) (if (member x accum) accum (cons x accum)))
> '()
> lst))
>
> (rem-dups '(0 2 3 4 (8 7) 3 2 0 (8 7)))
> ===>
> (4 3 2 0 (8 7))
Actual result:
((8 7) 4 3 2 0)