Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.Re: Ugly loop

3 views
Skip to first unread message

Robert L.

unread,
Jan 21, 2017, 12:33:25 PM1/21/17
to
Kenny Tilton wrote:

> btw, I believe the thing that got me to look at loop was that it
> provides efficiency for free, which is rare in cheats:
>
> (loop for x in them
> when (yada x)
> collect x)
>
> vs:
>
> (let (out)
> (dolist (x them (nreverse out))
> (when (yada x) (push x out)
>
> If I had learned Lisp from PCL I would have grown up with loop as a
> native sub-language and not gone seven years without it.

Ruby:

(0..9).select(&:even?)

===>
[0, 2, 4, 6, 8]

In Forth?


--
The goal is to meet the EU challenge of interracial marriage. It's not a
choice. It's an obligation. If voluntarism does not work for the republic,
then the state will move in with more coercive measures.
--- the Jew Nicolas Sarkozy (www.youtube.com/watch?v=K0hD7IffTJs)
0 new messages