Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #306: CPU-angle has to be adjusted because of vibrations coming from the nearby road


comp / comp.lang.lisp / duplic8

SubjectAuthor
o duplic8B. Pym

1
Subject: duplic8
From: B. Pym
Newsgroups: comp.lang.lisp
Organization: A noiseless patient Spider
Date: Mon, 1 Jul 2024 21:48 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (B. Pym)
Newsgroups: comp.lang.lisp
Subject: duplic8
Date: Mon, 1 Jul 2024 21:48:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <v5v87f$18sjt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Mon, 01 Jul 2024 23:48:34 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="9099878c51a56220d0bc6f7a66c2abea";
logging-data="1340029"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zBmTGgItuv8ChpaTD+07Q"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:1ujy+zxCseugVGDli79ZX9CPHkQ=
View all headers

Erik Naggum wrote:

> I prefer to use KEY and TEST keyword arguments that default to #'IDENTITY
> and #'EQL.
>
> (defun duplic8 (element list &key (test #'eql) (key #'identity))
> (loop for x in list
> collect x
> when (funcall test (funcall key x) element) collect x))

Scheme

(append-map
(lambda (x) (if (equal? x 'M) (list x x x) (list x)))
'(i M j l))

===>
(i M M M j l)

1

rocksolid light 0.9.8
clearnet tor