Clarify contract comparison for characters.
This commit is contained in:
parent
6454f85397
commit
547ddaa6f5
|
@ -52,13 +52,13 @@ constraints.
|
|||
various operations listed in this section of the manual, and various
|
||||
ordinary Racket values that double as contracts, including
|
||||
@itemize[
|
||||
@item{@tech{symbols}, @tech{booleans}, @tech{characters}, @tech{keywords}, and
|
||||
@item{@tech{symbols}, @tech{booleans}, @tech{keywords}, and
|
||||
@racket[null], which are treated as contracts that recognize
|
||||
themselves, using @racket[eq?], }
|
||||
|
||||
@item{@tech{strings}, @tech{byte strings}, @racket[+nan.0], and
|
||||
@racket[+nan.f], which are treated as contracts
|
||||
that recognize themselves using @racket[equal?], }
|
||||
@item{@tech{strings}, @tech{byte strings}, @tech{characters},
|
||||
@racket[+nan.0], and @racket[+nan.f], which are treated
|
||||
as contracts that recognize themselves using @racket[equal?], }
|
||||
|
||||
@item{@tech{numbers} (except @racket[+nan.0] and
|
||||
@racket[+nan.f]), which are treated as contracts
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
(test-flat-contract #\a #\a #\b)
|
||||
(test-flat-contract #\a #\a 'a)
|
||||
(test-flat-contract ''a 'a 'b)
|
||||
(let ([a #\⊢])
|
||||
(test-flat-contract a (integer->char (char->integer a)) #\a))
|
||||
(test-flat-contract ''a 'a #\a)
|
||||
(test-flat-contract "x" "x" "y")
|
||||
(test-flat-contract "x" "x" 'x)
|
||||
|
|
Loading…
Reference in New Issue
Block a user