(define (char=-predicate char)
(guarantee char? char 'char=-predicate)
- (lambda (char*)
- (char=? char* char)))
+ (let ((predicate
+ (lambda (char*)
+ (and (char? char*)
+ (char=? char* char)))))
+ (register-predicate! predicate `(char=-predicate ,char) '<= char?)
+ predicate))
(define (char-ci=-predicate char)
(guarantee char? char 'char-ci=-predicate)
- (lambda (char*)
- (char-ci=? char* char)))
+ (let ((predicate
+ (lambda (char*)
+ (and (char? char*)
+ (char-ci=? char* char)))))
+ (register-predicate! predicate `(char-ci=-predicate ,char) '<= char?)
+ predicate))
\f
(define-integrable (%char=? x y)
(fix:= (char->integer x) (char->integer y)))
#f)))))
(define (char-set-predicate char-set)
- (guarantee char-set? char-set 'CHAR-SET-PREDICATE)
- (lambda (char)
- (and (bitless-char? char)
- (char-in-set? char char-set))))
+ (guarantee char-set? char-set 'char-set-predicate)
+ (let ((predicate
+ (lambda (char)
+ (and (bitless-char? char)
+ (char-in-set? char char-set)))))
+ (register-predicate! predicate 'char-set-predicate '<= char?)
+ predicate))
(define (char-set=? char-set . char-sets)
(every (lambda (char-set*)