Quick review Wolfgang Corcoran-Mathe (10 Jan 2024 20:40 UTC)
Re: Quick review Marc Nieper-Wißkirchen (07 Sep 2024 13:58 UTC)
Re: Quick review Wolfgang Corcoran-Mathe (09 Sep 2024 17:18 UTC)
Re: Quick review Marc Nieper-Wißkirchen (09 Sep 2024 20:13 UTC)

Re: Quick review Wolfgang Corcoran-Mathe 09 Sep 2024 17:18 UTC

Hi Marc,

Thanks for fixing things. The ‘guard’ formatting is much better now.

On 2024-09-07 15:58 +0200, Marc Nieper-Wißkirchen wrote:
> Please explain what the examples do and how they work.
> > make-coroutine-generator is at least described in SRFI 158, but
> > for-each->fold is novel. It's not obvious what it means
> > to "transform a procedure with for-each-like semantics describing
> > an abstract list into a procedure with fold-like semantics
> > describing the same abstract list."
> >
>
> If you have better wording, please let me know.

After looking at the definitions for a while I can’t think of anything
better. I understand what you mean by “for-each-like semantics
describing an abstract list”, but the name ‘for-each->fold’ may be
confusing to some people because it does not operate on procedures
like RnRS ‘for-each’, but on flipped, partially-applied for-each-likes.
(And I have no better name for the latter!)

Also, the ‘string-fold’ example using ‘for-each->fold’ gives me a
cryptic error on Guile:

    xxxxxx@(guile-user)> (string-fold cons '() "hello")

    ice-9/boot-9.scm:1683:16: In procedure raise-exception:
    Wrong type (expecting resumable continuation): #<vm-continuation
      7fbaade232d0>

I’m not sure what the problem is. The tests, including the one that
tests ‘for-each->fold’, pass without errors.

Wolf

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>