On Fri, Nov 11, 2011 at 12:07 PM, Paul Leger wrote:
> On 11/11/2011 11:02 AM, Sam Tobin-Hochstadt wrote:
>>
>> Unfortunately, Typed Racket needs a little more help from the
>> programmer here. This will work:
>>
>> #lang typed/racket
>> (: g (case-> (-> Number)
>> (Number -> Numbe
On 11/11/2011 11:02 AM, Sam Tobin-Hochstadt wrote:
Unfortunately, Typed Racket needs a little more help from the
programmer here. This will work:
#lang typed/racket
(: g (case-> (-> Number)
(Number -> Number)))
(define (g [#{x : Number} 10]) x)
I hope to make what you wrote wo
On Fri, Nov 11, 2011 at 6:22 AM, Eric Tanter wrote:
>
> but if I annotate g using case->, the same error happens:
>
> (: g (case-> (-> Number) (Number -> Number)))
> (define (g [x 10])
> x)
>
> Type Checker: Expected Number, but got Any in: (define (g (x 10)) x)
>
> Can someone explain why this e
Hi,
A very simple question, but I could not find the answer in the guide/reference.
Suppose I have the identity over Numbers:
(: g (Number -> Number))
(define (g x)
x)
Now I want to make x optional.
(: g (Number -> Number))
(define (g [x 10])
x)
Type Checker: Expected Number, but got Any
4 matches
Mail list logo