[racket-dev] typed/scheme n00b question

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Sep 7 08:04:37 EDT 2010

On Tue, Sep 7, 2010 at 6:54 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>>  (U (String -> Exact-Nonnegative-Integer)
>>     (String False -> Exact-Nonnegative-Integer)
>>     (String Exact-Nonnegative-Integer -> Void)
>>     (String (Option Exact-Nonnegative-Integer) (-> Any) -> Any))
>>
>> is more precise, but IIRC, it's not equivalent to the above -- ?
>
> Why does everyone always want to use union for this?  Everything you
> wrote there is correct, except that `U' should be `case-lambda'.
>
> You can't use that type in `require/typed', though, since the contract
> library doesn't accept `case->' contracts like that.

The "like that" part is that two different arms of the case-> would
have the same arity?

Robby


Posted on the dev mailing list.