Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The test of intelligent tinkering is to save all the parts. -- Aldo Leopold


devel / comp.lang.lisp / .Re: Loop? ptooey

SubjectAuthor
o .Re: Loop? ptooeyRobert L.

1
.Re: Loop? ptooey

<t16kak$3jl$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!S67R10mEKBUZBWFQmgY1nQ.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .Re: Loop? ptooey
Date: Sun, 20 Mar 2022 07:15:34 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t16kak$3jl$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="3701"; posting-host="S67R10mEKBUZBWFQmgY1nQ.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. - Sun, 20 Mar 2022 07:15 UTC

> > > KMP: The example you cite is quite simplistic.....snip...A
> > > loop like this:
> > >
> > > (loop for x from 0
> > > for y in some-list
> > > when (good-result? y)
> > > collect (list x y))
> > >
> > > is easy to write and maintain, and much easier to explain than the
> > > equivalent, but more Lispy:
> > >
> > > (do ((x 0 (+ x 1))
> > > (y-list some-list (cdr y-list))
> > > (result '()))
> > > ((null y-list) ;; [fixed]
> > > (nreverse result))
> > > (let ((y (first y-list)))
> > > (when (good-result? y)
> > > (push (list x y) result))))

Gauche Scheme:

(filter-map
(lambda (x i) (and (odd? x) (list i x)))
'(3 4 5 7 8)
(liota))

===>
((0 3) (2 5) (3 7))

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor