[racket] Writing type predicates in typed/racket

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Nov 6 19:36:36 EDT 2010

On Sat, Nov 6, 2010 at 6:52 PM, Eric Dobson <endobson at cs.brown.edu> wrote:
> I don't think that define-predicate will give me a constant time
> branch? because it returns something of type (Any -> Boolean : t), and
> so can't use the fact that the car and cdr are num-trees without
> checking it.

`define-predicate' should be exactly what you want, and it should
enable all the same things that the predicate you wrote would.

Making the predicate you wrote typecheck correctly is planned, but
won't happen immediately.
sam th
samth at ccs.neu.edu

Posted on the users mailing list.