| Deutsch English Français Italiano |
|
<1039akl$khbd$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: "B. Pym" <Nobody447095@here-nor-there.org>
Newsgroups: comp.lang.lisp
Subject: Re: Strange issue with packages
Date: Sun, 22 Jun 2025 16:22:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <1039akl$khbd$1@dont-email.me>
References: <102v980$3c90m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Sun, 22 Jun 2025 18:22:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="165e2dbb2f6af68ad2f5d14dbb40a70b";
logging-data="673133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+exKeYAPeDrM2yGVVhmXqV"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:jOXk2kP0Y6jGuV0YAj228bN/ryI=
B. Pym wrote:
> Pascal Costanza wrote:
>
> > (defun count (element list)
> > (loop for x in list
> > count (eql x element)))
>
> Scheme
>
> (count (cut eqv? <> 'm) '(m n o p m a k m o))
>
> ===>
> 3
Using "is":
(count (is 'm) '(m n o p m a k m o))
Given:
(define is
(case-lambda
[(x) (lambda(y) (equal? y x))]
[(pred x) (lambda(y) (pred y x))]
[(key pred x) (lambda(y) (pred (key y) x))]))