unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Matt Wette <mwette@alumni.caltech.edu>
Cc: 20375-done@debbugs.gnu.org
Subject: bug#20375: doc. error in v 2.0.11, Section 7.6.2.5
Date: Thu, 23 Jun 2016 22:07:26 +0200	[thread overview]
Message-ID: <87mvmblldt.fsf@pobox.com> (raw)
In-Reply-To: <89A136F3-5E08-4BC7-BC7A-9021B65598ED@alumni.caltech.edu> (Matt Wette's message of "Sun, 19 Apr 2015 19:20:57 -0700")

On Mon 20 Apr 2015 04:20, Matt Wette <mwette@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





      reply	other threads:[~2016-06-23 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  2:20 bug#20375: doc. error in v 2.0.11, Section 7.6.2.5 Matt Wette
2016-06-23 20:07 ` Andy Wingo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvmblldt.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=20375-done@debbugs.gnu.org \
    --cc=mwette@alumni.caltech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).