racket / htdp

Other
93 stars 70 forks source link

Fix check-range documentation to allow inexact numbers. #78

Closed tov closed 5 years ago

tov commented 5 years ago

The documentation currently says that it's an error for any of the three expressions given to check-range to produce an inexact number. But inexact numbers are exactly what check-range is intended for, and it's not actually an error to use it on them:

(check-range pi (sub1 pi) (add1 pi))
(check-range pi pi pi)