Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #324: Your packets were eaten by the terminator


comp / comp.lang.lisp / Re: distinction?

SubjectAuthor
* Re: distinction?B. Pym
`- Re: distinction?Kaz Kylheku

1
Subject: Re: distinction?
From: B. Pym
Newsgroups: comp.lang.lisp
Organization: A noiseless patient Spider
Date: Fri, 5 Jul 2024 21:21 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (B. Pym)
Newsgroups: comp.lang.lisp
Subject: Re: distinction?
Date: Fri, 5 Jul 2024 21:21:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <v69o3k$3enaf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Fri, 05 Jul 2024 23:21:09 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="40a3200374f17ef88ea3af0f210681e4";
logging-data="3628367"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sPvKPjzFARJNGd9x/wOuj"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:6QGRZtD2bXqA0ZE3fz+bSQ3bMd8=
View all headers

Kent M. Pitman wrote:

> I guess my point is that some things "feel" recursive and should be expressed
> recursively. But some things "feel" iterative, and I don't see anything wrong
> with:
>
> (loop for entry in some-list
> for name = (person-name entry)
> for age = (person-age entry)
> collect (list name age))

Abysmal.

(map
(lambda (entry) (list (person-name entry) (person-age entry)))
some-list)

Subject: Re: distinction?
From: Kaz Kylheku
Newsgroups: comp.lang.lisp
Organization: A noiseless patient Spider
Date: Sat, 6 Jul 2024 00:50 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 643-408-1753@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp
Subject: Re: distinction?
Date: Sat, 6 Jul 2024 00:50:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20240705174918.512@kylheku.com>
References: <v69o3k$3enaf$1@dont-email.me>
Injection-Date: Sat, 06 Jul 2024 02:50:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="fc51a894bcb0298b20f0a8b2608abe07";
logging-data="3689131"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mqsMXP0nsch0O4ubA1hz0Fsu8RzU17VU="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:9G4zqAWULKjfImzDF/73wpRkHuc=
View all headers

On 2024-07-05, B. Pym <No_spamming@noWhere_7073.org> wrote:
> Kent M. Pitman wrote:
>
>> I guess my point is that some things "feel" recursive and should be expressed
>> recursively. But some things "feel" iterative, and I don't see anything wrong
>> with:
>>
>> (loop for entry in some-list
>> for name = (person-name entry)
>> for age = (person-age entry)
>> collect (list name age))
>
> Abysmal.
>
> (map
> (lambda (entry) (list (person-name entry) (person-age entry)))
> some-list)

TXR Lisp:

(mapcar [juxt .name .age] person-list)

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

1

rocksolid light 0.9.8
clearnet tor