[racket-dev] Non-negative real predicate?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Jun 10 16:08:35 EDT 2011

Make a real predicate and link to it. 


On Jun 10, 2011, at 3:23 PM, Asumu Takikawa wrote:

> 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?
> 
> Cheers,
> Asumu
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev



Posted on the dev mailing list.