(Previous discussion continued)
bug fix in SRFI 121 implementation Arthur A. Gleckler 12 Aug 2016 01:32 UTC
Re: bug fix in SRFI 121 implementation Kevin Wortman 12 Aug 2016 04:18 UTC

bug fix in SRFI 121 implementation Arthur A. Gleckler 12 Aug 2016 01:32 UTC

Kevin Wortman has contributed a fix to a bug in the
reference implementation for SRFI 121, and has done minor
refactoring, too.  John Cowan, one of the authors, has
approved this change, so I've published it on
<srfi.schemers.org>.

The diffs are here:

  <https://github.com/scheme-requests-for-implementation/srfi-121/pull/10/files>

Kevin's description is here:

| Commit cd3f56f fixed a bug in generator->list, where the
| procedure could consume the wrong number of elements from
| the generator.  It turns out that generator->reverse-list
| has the same bug.  This patch fixes that.
>
| While we're at it, we replaced each of these problematic
| loops with a one-liner that reuses other procedures.  The
| old loops were not tail-recursive, so they allocated O(n)
| activation records. The new code avoids that so should
| perform better.

| Commit Summary
>
| * fix overconsumption in generator->reverse-list, as in
|   generator->list
>
| File Changes
>
| * M generators/generators-impl.scm (28)

Thanks, Kevin.

Regards,

SRFI Editor