GNU bug report logs - #20375
doc. error in v 2.0.11, Section 7.6.2.5

Previous Next

Package: guile;

Reported by: Matt Wette <mwette <at> alumni.caltech.edu>

Date: Mon, 20 Apr 2015 02:22:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20375 in the body.
You can then email your comments to 20375 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#20375; Package guile. (Mon, 20 Apr 2015 02:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Wette <mwette <at> alumni.caltech.edu>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 20 Apr 2015 02:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matt Wette <mwette <at> alumni.caltech.edu>
To: bug-guile <at> gnu.org
Cc: mwette <at> alumni.caltech.edu
Subject: doc. error in v 2.0.11, Section 7.6.2.5
Date: Sun, 19 Apr 2015 19:20:57 -0700
The reference manual for guile 2.0.11 has an error in  Section 7.6.2.5 on rnrs lists.  The statement "identical to the fold ..." is not quite correct.  The section says:

fold-left combine nil list1 list2 . . . [Scheme Procedure] fold-right combine nil list1 list2 . . . [Scheme Procedure] These procedures are identical to the fold and fold-right procedures provided by SRFI-1. See Section 7.5.3.5 [SRFI-1 Fold and Map], page 556, for documentation. 


In section 7.5.3.5, the manual says:
(fold cons ’() ’(1 2 3)) [...] (3 2 1)


But, fold-left does not work like fold: the arguments to the procedure to fold-left are reversed with respect to fold:.

 guile i2.0.11correctly gives the following:

(fold-left cons '() '(1 2 3)) => (((() . 1) . 2) . 3)

(fold-left xcons '() '(1 2 3)) => (3 2 1)


 Matt






Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Thu, 23 Jun 2016 20:08:02 GMT) Full text and rfc822 format available.

Notification sent to Matt Wette <mwette <at> alumni.caltech.edu>:
bug acknowledged by developer. (Thu, 23 Jun 2016 20:08:02 GMT) Full text and rfc822 format available.

Message #10 received at 20375-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Matt Wette <mwette <at> alumni.caltech.edu>
Cc: 20375-done <at> debbugs.gnu.org
Subject: Re: bug#20375: doc. error in v 2.0.11, Section 7.6.2.5
Date: Thu, 23 Jun 2016 22:07:26 +0200
On Mon 20 Apr 2015 04:20, Matt Wette <mwette <at> alumni.caltech.edu> writes:

> The reference manual for guile 2.0.11 has an error in Section 7.6.2.5
> on rnrs lists.  The statement "identical to the fold ..." is not quite
> correct.  The section says:
>
> fold-left combine nil list1 list2 . . . [Scheme Procedure] fold-right
> combine nil list1 list2 . . . [Scheme Procedure] These procedures are
> identical to the fold and fold-right procedures provided by
> SRFI-1. See Section 7.5.3.5 [SRFI-1 Fold and Map], page 556, for
> documentation.
>
>
> In section 7.5.3.5, the manual says:
> (fold cons ’() ’(1 2 3)) [...] (3 2 1)
>
>
> But, fold-left does not work like fold: the arguments to the procedure to fold-left are reversed with respect to fold:.
>
>  guile i2.0.11correctly gives the following:
>
> (fold-left cons '() '(1 2 3)) => (((() . 1) . 2) . 3)
>
> (fold-left xcons '() '(1 2 3)) => (3 2 1)

Gah, you're right.  What a mess.  Fixed in master, will backport
soonish.

Andy




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Jul 2016 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 337 days ago.

Previous Next


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