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

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

bug#29799: 24.5; cl-loop guard clause missing


From: dick . r . chiang
Subject: bug#29799: 24.5; cl-loop guard clause missing
Date: Fri, 22 Nov 2019 08:51:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>>>> Lars Ingebrigtsen <larsi@gnus.org> writes:

>> ;; should return (1 0) (cl-loop with result for x below 3 for y below 2 and
>> z = (progn (push x result) nil) finally return result)

> I applied the patch and ran that test case, and it returned
> (2 1 0).  But shouldn't it return (2 1)?

Ah, clisp also returns (2 1 0), so while my initial claim is wrong, I am happy
the patch conforms with clisp.

My human instinct is to say it should return (1 0), but the simultaneity
semantics of "and" are tricky.

Under no interpretation, do I see it returning (2 1).

iter#1 x is 0, *simultaneously* set y = 0 and result = (0)
iter#2 x is 1, *simultaneously* set y = 1 and result = (1 0)
iter#3 x is 2, *simultaneously* break out of loop and result = (2 1 0)





reply via email to

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