help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Precedence of for clauses in cl-loop


From: Plamen Tanovski
Subject: Re: Precedence of for clauses in cl-loop
Date: Fri, 07 Sep 2018 09:08:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Noam Postavsky <npostavs@gmail.com> writes:

> On 6 September 2018 at 14:33, Plamen Tanovski <pgt@tanovski.de> wrote:
>
>> in this simple example
>>
>> (cl-loop for y = x
>>          for x in '(1 2)
>>          for z in '(1 2))
>>
>>
>> the "for in" clauses are executed before the "for =" clause.
>
> I disagree. I invite you to prove me wrong.

simply edebug the loop shows the precedence, but below as example a loop
which gives error, beacuse the z part is executed before the y line:

(cl-loop
 for x in (number-sequence 1 10)
 for y = (1+ x) 
 for z in (elt (number-sequence 1 10) y))


-- 
Plamen Tanovski




reply via email to

[Prev in Thread] Current Thread [Next in Thread]