Re: SRFI 152 string-unfold contradictions
Peter McGoron 16 Oct 2026 11:51 UTC
> My guess is that it had in mind the case like mapping #\ß (U+00DF) to "SS", or #\ヸ (U+30F8) to "ゐ◌゙" (U+3090 U+3099). string-unfold may want
to generate multiple codepoints per seed.>
> But that seems an incomplete solution, for most other string scanning procedures walks codepoint by codepoint. What we want would be some kind of grapheme-unfold / grapheme-map etc.
That sounds like a good reason for keeping the current SRFI 152
behavior, although I'm not particularly attached to it.
One can make an arbitrary traversal of a string using a generator (or in
an implementation that optimizes it, string-ref).
-- Peter McGoron