Hi all, I have a function - create-points- which takes two lists of Flonum and yields a list of vector pairs suitable for passing to Racket's plot function.
In un-typed code I can just do; (define (create-points xs ys) (map vector xs ys)) and voila! It works. However the only way I have managed to get it to type check is by wrapping the vector function in a lambda; (: create-points : (Listof Flonum) (Listof Flonum) -> (Listof (Vectorof Flonum)) (define (create-points xs ys) (map (lambda ([x : Flonum] [y : Flonum]) (vector x y)) xs ys)). I have tried using an inst form, but I cannot seem to get that to work. Question is thought, is wrapping the vector function in a lambda the only way to do this? Cheers, greadey -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/b6192278-03b1-4720-a3c2-72a915e6c959%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.