[racket-dev] typed/racket for loops?
On Jun 7, 2011, at 12:24 PM, Hari Prashanth wrote:
> Its a bad error message I believe.
>
> (: p (Listof Fixnum))
> (define p
> (for/list: : (Listof Fixnum) ([i : Fixnum (in-range 30)]) i))
In that case, it appears that there's also a doc bug; the docs say:
(for/list: : u (for:-clause ...) expr ...+)
... "The last expr of the body must have type u."
This would suggest that the type annotation used for 'u' above should be Fixnum, not (Listof Fixnum). Are the docs correct, or is the implementation?
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110607/900de75b/attachment.p7s>