Hello again,
SRFI 152’s ‘string-segment’ is underspecified:
* Per the Notation, ‘k’ can be zero, but there is no indication
of what happens if it is. Clearly this case is “an error”.
(The sample implementation signals one.)
* The specification seems to suggest that (string-segment "" 1)
evaluates to (""), but the sample implementation returns ().
Is this a special case? I suspect so, since otherwise an empty
final segment would have to be tacked on to every segment list.
The sample implementation is correct, I think.
I’ve attached an erratum patch fixing both of these issues. I hope
it’s acceptable.
Wolfgang
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>