[racket] Typed Racket and in-vector; Failure to Type Check

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Tue Nov 5 21:27:38 EST 2013

On Tue, Nov 5, 2013 at 8:22 PM, Daniel King <daniel.zidan.king at gmail.com> wrote:
> I'm implementing an operation in Typed Racket to find the maximum element of a
> vector (if this already exists and I missed it, I'd love a pointer to
> it!).


I think `(apply max (vector->list v))` is the shortest way to write
this function.  Also: `(vector-ref v (argmax values v))`.

Sam

Posted on the users mailing list.