[R6RS] revised Unicode SRFI
Michael Sperber
sperber at informatik.uni-tuebingen.de
Wed Mar 29 10:05:02 EST 2006
Matthew Flatt <mflatt at cs.utah.edu> writes:
>> - I don't much like the name "char-symbol-part?"---the name confused
>> me as to its purpose. How about `char-printable-symbol-part?' ?
>
> Ok. Or do we need it at all?
It might make sense, as we're providing heavyweight operations like
case-mapping and normalization, to aid people in implementing
procedures such as this, to just make the category information from
UnicodeData.txt available directly. This also leads to
straightforward implementations of many predicates.
For the reference implementation, I added these:
(char-general-category ch)
which gives you one of (general-category {upper-case-letter, ...})
and
(general-category-primary-category gc)
which gives you one of (primary-category {letter, number, punctuation, ...})
This then allows you to do things like:
(define (char-alphabetic? c)
(eq? (primary-category letter)
(general-category-primary-category (char-general-category c))))
(define (char-numeric? c)
(eq? (primary-category number)
(general-category-primary-category (char-general-category c))))
...
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the R6RS
mailing list