Re: New draft (#5) of SRFI 189: Maybe and Either: optional container types
Marc Nieper-WiÃkirchen 16 Jun 2020 19:17 UTC
Am Di., 16. Juni 2020 um 20:47 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
> I'm going with `list-truth`. Using "truth" conveys meaning in a way that "*" doesn't.
+1
>> the unfold thing
>
>
> I'm going with this wording:
>
> If stop? returns true on seeds, a Nothing / a Left of seeds is returned. Otherwise, successor is applied to seeds. If stop? returns false on the results, it is an error. But if the second call to stop? returns true, the results of mapper are wrapped in a Just/Right and returned.
>
> So this requires stop? to be called twice.
Thanks! I think that catches the semantics correctly.
Wolfgang, what do you think?
>> Could you add `either->truth' and `either->multitruth' and `truth->either' and `multitruth->either' as well?
> Done. There are now maybe and either pairs for all the protocols except `two-values`.
Thanks again very much! (And sorry for me being such a PITA.)