On Sun, Jul 9, 2023 at 8:08 AM Marc Nieper-Wißkirchen <[email protected]>
wrote:

so SRFI 14's sample implementation is "right", not the formal
> specification. That it is a typo in the formal specification can be
> seen from the examples following the description of
> char-set-unfold(!). They also use the "right" order.


 In addition to the evidence already pesented, I did a search of the
various SRFIs with unfold procedures, and the rest all have the "p f g" (or
"stop? mapper successor") order. I therefore propose the following PFN:

"As originally written, this SRFI placed the stop predicate P as the second
argument of <b>char-set-unfold</b> and <b>char-set-unfold-right</b>, and
the mapper procedure F as the first argument.  However, the examples, the
sample implementation, and the unfold predicates in SRFI 1 and other SRFIs
with unfold procedures all agree on placing P as the first argument.
Implementers are therefore urged to treat the formal specification as
erroneous and P-first as the correct order of arguments.  This will happen
automatically by using the unchanged sample implementation."

>

Reply via email to