(Previous discussion continued)
Fwd: [scheme-requests-for-implementation/srfi-121] fix overconsumption in generator->reverse-list, as in generator->list (#10) Arthur A. Gleckler 11 Aug 2016 02:21 UTC
Re: Fwd: [scheme-requests-for-implementation/srfi-121] fix overconsumption in generator->reverse-list, as in generator->list (#10) Jeremy Steward 11 Aug 2016 02:36 UTC

Fwd: [scheme-requests-for-implementation/srfi-121] fix overconsumption in generator->reverse-list, as in generator->list (#10) Arthur A. Gleckler 11 Aug 2016 02:21 UTC

Hello, authors of SRFI 121.  Do you approve of the bug fix
by Kevin Wortman described below?  If so, I will publish it.

Thanks, Kevin.

kevinwortman <xxxxxx@github.com> writes:

| 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.
>
| ----------------------------------------------------------------------
>
| You can view, comment on, or merge this pull request online at:
>
| https://github.com/scheme-requests-for-implementation/srfi-121/pull/10
>
| Commit Summary
>
| * fix overconsumption in generator->reverse-list, as in
|   generator->list
>
| File Changes
>
| * M generators/generators-impl.scm (28)
>
| Patch Links:
>
| * https://github.com/scheme-requests-for-implementation/srfi-121/pull/10.patch
>
| * https://github.com/scheme-requests-for-implementation/srfi-121/pull/10.diff
>
>
| —
| You are receiving this because you are subscribed to this thread.
| Reply to this email directly, view it on GitHub, or mute the thread.