At Wed, 20 Feb 2013 20:49:02 -0700, Neil Toronto wrote: > > Well, you can't do it like that, but you can like this: > > #lang typed/racket > > (: test0 (Integer [#:zero Integer] -> Boolean)) > (define (test0 x #:zero [v 0]) > (= x v)) > > I think the `Keyword' type is for symbols that happen to be keywords: > > (cast '#:zero Keyword) > > I believe there is currently no way to type a function that has required > keywords; i.e. they have to be optional.
Mandatory keywords work too. (: test1 (Integer #:zero Integer -> Boolean)) (define (test1 x #:zero v) (= x v)) Vincent ____________________ Racket Users list: http://lists.racket-lang.org/users