(cdr ilists))
(loop (cdr ilists)))
#t)))
+
+(define (char-set-ci-predicate char-set)
+ (let ((char-set (char-set-foldcase char-set)))
+ (lambda (char)
+ (char-set-contains? char-set (char-foldcase char)))))
\f
;;;; Iterators
(values (ilist->char-set (ilist-difference* ilist ilists))
(ilist->char-set (fold ilist-intersection ilist ilists))))
(values char-set char-set)))
+
+(define (domain-mapper proc proc-domain)
+ (let ((domain (char-set->ilist proc-domain)))
+ (lambda (char-set)
+ (ilist->char-set
+ (let ((ilist (char-set->ilist char-set)))
+ (ilist-union (ilist-difference ilist domain)
+ (ilist-map proc (ilist-intersection ilist domain))))))))
+
+(define char-set-foldcase)
+(define char-set-downcase)
+(define char-set-upcase)
+(defer-boot-action 'ucd
+ (lambda ()
+ (set! char-set-foldcase
+ (domain-mapper char-foldcase char-set:changes-when-case-folded))
+ (set! char-set-downcase
+ (domain-mapper char-downcase char-set:changes-when-lower-cased))
+ (set! char-set-upcase
+ (domain-mapper char-upcase char-set:changes-when-upper-cased))
+ unspecific))
\f
;;;; Char-Set Compiler
char-set->string ;SRFI 14
char-set-adjoin ;SRFI 14
char-set-any ;SRFI 14
+ char-set-ci-predicate
char-set-complement ;SRFI 14
char-set-contains? ;SRFI 14
char-set-copy ;SRFI 14
char-set-delete ;SRFI 14
char-set-diff+intersection ;SRFI 14
char-set-difference ;SRFI 14
+ char-set-downcase
char-set-empty?
char-set-every ;SRFI 14
char-set-filter ;SRFI 14
char-set-fold ;SRFI 14
char-set-fold-right
+ char-set-foldcase
char-set-for-each ;SRFI 14
char-set-hash ;SRFI 14
char-set-intersection ;SRFI 14
char-set-unfold ;SRFI 14
char-set-union ;SRFI 14
char-set-union*
+ char-set-upcase
char-set-xor ;SRFI 14
char-set-xor*
char-set:ascii ;SRFI 14