GNU bug report logs -
#20375
doc. error in v 2.0.11, Section 7.6.2.5
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#20375: doc. error in v 2.0.11, Section 7.6.2.5
which was filed against the guile package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 20375 <at> debbugs.gnu.org.
--
20375: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20375
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
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
This bug report was last modified 8 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.