On Jul 14, 2014, at 10:19 AM, Sam Tobin-Hochstadt wrote:
> This version with `for/fold` works for me:
>
> (for/fold : (U Index #f) ([k : (U Index #f) #f])
> ([i : Index (ann (in-range 5) (Sequenceof Index))])
> i)
I’m not sure what it was then, because I just tried for/fold again and it
wor
This version with `for/fold` works for me:
(for/fold : (U Index #f) ([k : (U Index #f) #f])
([i : Index (ann (in-range 5) (Sequenceof Index))])
i)
Sam
On Sun, Jul 13, 2014 at 11:15 PM, Alexander D. Knauth
wrote:
>
> On Jul 13, 2014, at 8:23 PM, Sam Tobin-Hochstadt wrote:
>
>> Probably, wha
On Jul 13, 2014, at 8:23 PM, Sam Tobin-Hochstadt wrote:
> Probably, what's going on here is that `for/last` has a hidden loop
> variable that starts off as `#f` and Typed Racket infers that to have
> type `False`.
I thought that was the whole point of adding the : (U Index #f), right? To
prov
Probably, what's going on here is that `for/last` has a hidden loop
variable that starts off as `#f` and Typed Racket infers that to have
type `False`.
If that's the case, there's nothing you can really do other than
rewrite this as `for/fold`.
Sam
On Sun, Jul 13, 2014 at 7:57 PM, Alexander D. K
On 04/19/2014 09:43 PM, Alexander D. Knauth wrote:
On Apr 19, 2014, at 10:44 PM, Neil Toronto mailto:neil.toro...@gmail.com>> wrote:
That is weird. It works in the nightly build without annotating
anything but `sphere3d`, and likely in the next release as well.
Keyword arguments haven't been a
On Apr 19, 2014, at 10:44 PM, Neil Toronto wrote:
> That is weird. It works in the nightly build without annotating anything but
> `sphere3d`, and likely in the next release as well. Keyword arguments haven't
> been all that well-supported in the past, so I'd try making the arguments to
> sph
On Apr 19, 2014, at 10:44 PM, Neil Toronto wrote:
> That is weird. It works in the nightly build without annotating anything but
> `sphere3d`, and likely in the next release as well. Keyword arguments haven't
> been all that well-supported in the past, so I'd try making the arguments to
> sp
When I take out the #{} annotations, it gives me 24 errors (with some repeated)
instead of just 6: (that’s the reason I put them there in the first place)
(: sphere3d (#:posn (Vectorof Real) #:r Nonnegative-Real [#:color Plot-Color]
-> renderer3d))
(define (sphere3d #:posn ctr.posn #:r r #:color
Oh, Neil's post arrived just as mine went out.
I'm using Racket HEAD.
Racket Users list:
http://lists.racket-lang.org/users
That is weird. It works in the nightly build without annotating anything
but `sphere3d`, and likely in the next release as well. Keyword
arguments haven't been all that well-supported in the past, so I'd try
making the arguments to sphere3d positional instead.
FWIW, the easiest way to destruct
I think you don't want those #{} annotations in the function definition:
> (define (sphere3d #:posn #{ctr.posn : (Vectorof Real)} #:r #{r :
> Nonnegative-Real} #:color [#{color : Plot-Color} "black"])
The following typechecks OK for me:
(define (sphere3d #:posn ctr.posn #:r r #:color [color "bla
11 matches
Mail list logo