(define (unicode-char? object)
(and (char? object)
- (let ((n (char->integer object)))
- (and (unicode-scalar-value? n)
- (not (non-character? n))))))
+ (unicode-char-code? (char->integer object))))
+
+(define (unicode-char-code? object)
+ (and (unicode-scalar-value? object)
+ (not (non-character? object))))
(define-integrable (unicode-code-point? object)
(and (index-fixnum? object)
'<= index-fixnum?)
(register-predicate! unicode-scalar-value? 'unicode-scalar-value
'<= unicode-code-point?)
+ (register-predicate! unicode-char-code? 'unicode-char-code
+ '<= unicode-scalar-value?)
(register-predicate! uninterned-symbol? 'uninterned-symbol '<= symbol?)
(register-predicate! weak-list? 'weak-list)
(register-predicate! weak-pair? 'weak-pair)