[racket] Optional parameters in Typed Racket?

From: Daniel Prager (daniel.a.prager at gmail.com)
Date: Sat Apr 26 02:59:39 EDT 2014

I'm new to Typed Racket and want to define an optional parameter. I found
(->*) in the docs, but trying out the example

#lang typed/racket
>


(: append-bar (->* (String) (Positive-Integer) String))
> (define (append-bar str [how-many 1])
>   (apply string-append str (make-list how-many "bar")))


gives me this error in 6.0:

Type Checker: not a valid type: (String) in: (String)


Am I missing something obvious?

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140426/c178782f/attachment.html>

Posted on the users mailing list.