Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"The medium is the massage." -- Crazy Nigel


devel / comp.lang.lisp / .Re: Loop macro

SubjectAuthor
o .Re: Loop macroRobert L.

1
.Re: Loop macro

<t2056p$vii$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17006&group=comp.lang.lisp#17006

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!y84MrHD3TWHDwuXw0tgD/g.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .Re: Loop macro
Date: Tue, 29 Mar 2022 23:36:58 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t2056p$vii$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="32338"; posting-host="y84MrHD3TWHDwuXw0tgD/g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.18.1.6
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert L. - Tue, 29 Mar 2022 23:36 UTC

Chris Riesbeck wrote:

> LOOP ... COLLECT vs. MAPCAR -- LAMBDA is a tie for me,
> but if you want to collect only certain values, then
>
> (loop for x in l
> when <test x>
> collect x)
>
> is hands-down clearer than
>
> (mapcan #'(lambda (x)
> (when <test x> (list x)))
> l)
>
> while
>
> (remove-if-not #'(lambda (x) <test x>) l)

Those who think that they know Loop actually know nothing
at all.

* (remove-if-not (lambda (n) (oddp n)) '(0 3 4 5 7))

(3 5 7)

* (remove-if-not 'oddp '(0 3 4 5 7))

(3 5 7)

>
> is OK but that double-negative leaves me cold.

Gauche Scheme:

(filter odd? (liota 22))
===>
(1 3 5 7 9 11 13 15 17 19 21)

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor