[racket] raise-type-error for keyword arguments

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sat Oct 30 04:45:13 EDT 2010

Has anyone come up with a good way to do "raise-type-error" for keyword 

For example, to extend the "feed-animals: expects type <goose> as 3rd 
argument, given:dog; other arguments were: cow sheep cat" form to 
keyword arguments, I was thinking that the application:

(foo "a" "b" #:x 42 #:y "mouse" #:z 69)

would result in an error message like:

foo: expected type <integer> for argument #:y, given: "mouse"; other 
arguments were: "a" "b" #:x 42 #:z 69


Posted on the users mailing list.