use (or/c #t #f 0 1)

even though it's less accurate, since that contract would allow inexact numbers like 0.0 and 1.0
This commit is contained in:
AlexKnauth 2019-05-01 14:07:06 -04:00 committed by Sam Tobin-Hochstadt
parent b2afedb70a
commit 47c2288eb6

View File

@ -89,7 +89,7 @@ This function is often used in conjunction with @racket[make-constructor-style-p
(make-constructor-style-printer
(lambda (obj) 'point)
(lambda (obj) (list (point-x obj) (point-y obj)))))]))
(print (point 1 2))
(write (point 1 2))]
@ -108,7 +108,7 @@ property, @racket[#f] otherwise.}
@defproc[(custom-write-accessor [v custom-write?])
(custom-write? output-port? (or/c boolean? (integer-in 0 1)) . -> . any)]{
(custom-write? output-port? (or/c #t #f 0 1) . -> . any)]{
Returns the custom-write procedure associated with @racket[v].}