Iteration revisited Daphne Preston-Kendal (25 Oct 2021 06:30 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (25 Oct 2021 10:37 UTC)
Re: Iteration revisited Daphne Preston-Kendal (25 Oct 2021 11:27 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (25 Oct 2021 11:43 UTC)
Re: Iteration revisited John Cowan (25 Oct 2021 18:53 UTC)
Re: Iteration revisited siiky (25 Oct 2021 20:26 UTC)
Re: Iteration revisited Amirouche BOUBEKKI (26 Oct 2021 05:26 UTC)
Re: Iteration revisited Marc Feeley (26 Oct 2021 12:06 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (26 Oct 2021 12:17 UTC)
Re: Iteration revisited Marc Feeley (27 Oct 2021 14:13 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (27 Oct 2021 15:13 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (26 Oct 2021 07:14 UTC)
Re: Iteration revisited John Cowan (28 Oct 2021 00:48 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (28 Oct 2021 14:23 UTC)
Re: Iteration revisited John Cowan (28 Oct 2021 19:17 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (28 Oct 2021 19:42 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (29 Oct 2021 06:06 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (26 Oct 2021 07:27 UTC)
Re: Iteration revisited John Cowan (27 Oct 2021 15:35 UTC)
Re: Iteration revisited John Cowan (28 Oct 2021 00:31 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (28 Oct 2021 17:57 UTC)
Re: Iteration revisited Amirouche BOUBEKKI (25 Oct 2021 11:12 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (25 Oct 2021 11:28 UTC)
Re: Iteration revisited John Cowan (28 Oct 2021 00:13 UTC)
Re: Iteration revisited Marc Nieper-Wißkirchen (28 Oct 2021 17:38 UTC)

Re: Iteration revisited Amirouche BOUBEKKI 26 Oct 2021 05:26 UTC
Welcome to the conversation :)

>

> If I have a list of ports `l` and want to read the contents of all of
>

> them, `(map (cute read-string #f <>) l)` is one "obvious" way to go.
>

> Another probably better example is #f, although not related to
>

> generators & whatnot, which is commonly used as the "null value". Except
>

> when it is a valid input or output value. And that's why `maybe` from
>

> SRFI 189 is useful.
>

> siiky

In another thread the Maybe approach was also mentioned.

The problem I have with eof-object in generator is that eof-object is not a disjoint type for a dijoint behavior such as described in null object pattern [0].
In a way that is similar to JavaScript's `undefined` that shows up in code or errors, without giving information about what is the actual context or problem.

[0] https://en.wikipedia.org/wiki/Null_object_pattern

FWIW, and AFAIU that is an idea that is strong in Kernel, but I can't quote precisely the R-1RK report at this time.

At least with the functional approach, the user is free to use whatever sentinel they decided is the best fit.