Thomas Lord wrote:
Why can't I write a procedure that, say, reverses a string-like
value which can be either a BUCKY-STRING or a STRING
and which is a strictly portable procedure using just the core
functionality for strings?

Because there is no such thing as "portably reversing a string".
The semantics of doing so depends on what you consider the
"character units", which depends not only on language but also
on context.

The way to do it is with some kind of matcher/parser that
gets "the next character", extracts the corresponding sub-string,
and then concatenates the substrings in reverse order.

I.e. even this artificial (i.e. non-real-world puzzle-only) use-case
should be solved using string operations, rather than character
operations.
--
        --Per Bothner
[EMAIL PROTECTED]   http://per.bothner.com/

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to