GNU bug report logs - #29799
24.5; cl-loop guard clause missing

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Thu, 21 Dec 2017 09:39:02 UTC

Severity: normal

Tags: fixed

Found in version 24.5

Fixed in version 28.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: dick.r.chiang <at> gmail.com
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 29799 <at> debbugs.gnu.org, npostavs <at> gmail.com, monnier <at> iro.umontreal.ca, Tino Calancha <tino.calancha <at> gmail.com>
Subject: bug#29799: 24.5; cl-loop guard clause missing
Date: Fri, 22 Nov 2019 08:51:23 -0500
>>>>> Lars Ingebrigtsen <larsi <at> 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)




This bug report was last modified 5 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.