[racket-dev] Non-negative real predicate?

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Fri Jun 10 15:23:22 EDT 2011

Hi all,

I've seen some locations in the docs where a currently imaginary
predicate is used as a contract. 

e.g. the sleep function has a nonnegative-number? contract

The same contract is often expressed as 
  (and/c real? (not/c negative?))
in many locations. 

e.g. the get-extent method for snip%, methods for editor<%>, text%, etc.

It seems like the imaginary contract should be replaced with an actual
one. Should it be replaced by the combinator expression above in the
docs or can a predicate be made for this [somewhat common] case?


Posted on the dev mailing list.