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: Noam Postavsky
Subject: Re: Precedence of for clauses in cl-loop
Date: Fri, 7 Sep 2018 21:37:01 -0400

On 7 September 2018 at 08:35, Plamen Tanovski <pgt@tanovski.de> wrote:

> (cl-loop
>  for x on (number-sequence 1 10)
>  for z in (elt (number-sequence 1 10) (car x)))
>
> works fine, which means, x was assigned a value before the for z clause.

Hmm, I wasn't aware of this, but it seems to be on purpose,
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node239.html says:

    All variables are initialized first, regardless of where the
establishing clauses appear in the source. The order of initialization
follows the order of these clauses.



reply via email to

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