Deutsch   English   Français   Italiano  
<v61rmv$1q5l1$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "B. Pym" <No_spamming@noWhere_7073.org>
Newsgroups: comp.lang.lisp
Subject: Re: CAR/CDR vs FIRST/REST
Date: Tue, 2 Jul 2024 21:33:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <v61rmv$1q5l1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Tue, 02 Jul 2024 23:33:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="33dab6b85b955ed0102028bfe3f606d5";
	logging-data="1906337"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19fkZwanB+yM/f6cteDh1YC"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:r0xmnBzGZejPqVIDE41DGgDRPHg=
Bytes: 1137

Barry Margolin wrote:

> >       (mapcan #'(lambda (x) (and (numberp x) (list x))) list)
> 
> >       (loop for x in list
> >               when (numberp x) collect x)
> 
> I agree with this example.  Once I learned LOOP I never used the
> above idiom again.


(filter number? '(a b c 1 2 3))
 ===>
(1 2 3)