Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Asynchronous inputs are at the root of our race problems. -- D. Winker and F. Prosser


devel / comp.lang.lisp / Loopy idiocy

SubjectAuthor
* Loopy idiocyRobert L.
`- Re: Loopy idiocyJeff Barnett

1
Loopy idiocy

<t1o2cc$1v59$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!OqeOGrcX7oT7c14m3RGjKw.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: Loopy idiocy
Date: Sat, 26 Mar 2022 21:59:41 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t1o2cc$1v59$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="64681"; posting-host="OqeOGrcX7oT7c14m3RGjKw.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. - Sat, 26 Mar 2022 21:59 UTC

> (loop for x in list
> do (my-fcn x)
> return list)
>
> with the equivalent map forms...
>
> The latter example doesn't do what you think it does. It will call
> MY-FCN on the first element of LIST, and then return LIST. To be
> equivalent to mapc, it needs to be:
>
> (loop for x in list
> do (my-fcn x)
> FINALLY (return list))
>
> with the return in parentheses!

Gauche Scheme:

(define xs '(b c d))

(for-each print xs)

===>
b c
d

Re: Loopy idiocy

<t1o8nm$ouo$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jbb@notatt.com (Jeff Barnett)
Newsgroups: comp.lang.lisp
Subject: Re: Loopy idiocy
Date: Sat, 26 Mar 2022 17:48:03 -0600
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <t1o8nm$ouo$1@dont-email.me>
References: <t1o2cc$1v59$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 26 Mar 2022 23:48:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c2acd36ef3ae878541743cfe6b0cdce2";
logging-data="25560"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xzJa+FCeeoX0sXdV8qweRwDQsjFzdUR8="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:uDw1v9mZHrLhsjkQK+U/xFon7xM=
In-Reply-To: <t1o2cc$1v59$1@gioia.aioe.org>
Content-Language: en-US
 by: Jeff Barnett - Sat, 26 Mar 2022 23:48 UTC

On 3/26/2022 3:59 PM, Robert L. wrote:
>> (loop for x in list
>> do (my-fcn x)
>> return list)
>>
>> with the equivalent map forms...
>>
>> The latter example doesn't do what you think it does. It will call
>> MY-FCN on the first element of LIST, and then return LIST. To be
>> equivalent to mapc, it needs to be:
>>
>> (loop for x in list
>> do (my-fcn x)
>> FINALLY (return list))
>>
>> with the return in parentheses!
>
> Gauche Scheme:
>
> (define xs '(b c d))
>
> (for-each print xs)
>
> ===>
> b
> c
> d

Yours is incorrect. Read the spec above.
--
Jeff Barnett

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor