Re: Loop puzzle
On 2012-02-20, RG <rNOSPAMon@flownet.com> wrote:
> In article <20120219153534.580@kylheku.com>,
> Kaz Kylheku <kaz@kylheku.com> wrote:
>
>> On 2012-02-19, Raymond Wiker <raw@unknown-00-23-6c-8d-9e-26.lan> wrote:
>> > Helmut Eller <eller.helmut@gmail.com> writes:
>> > I think this happens because the two "for" clauses are executed in
>> > parallel, and the initial value for "a" seen by the second clause is
>> > nil.
>>
>> But there is no AND between the clauses to make them parallel. This is pretty
>> fucked up.
>
> Helmut is wrong. It is not "because the two "for" clauses are executed
> in parallel." It's because the A in "for b in a" is evaluated after A
> is bound but before it is assigned to '(a b).
Yes; the parallelism is for the stepping, which has nothing to do with the
initial binding, because even the first iteration is achieved by stepping.
I suspect where people go wrong is taking analogies between LOOP and DO/DO*
too far.
|