You might have some success using my arguments 
<https://docs.racket-lang.org/arguments/index.html> package, which defines 
an arguments? data structure wrapping a bundle of positional and keyword 
args. It also provides some functions that are like make-keyword-procedure 
and keyword-apply, but with a nicer interface based on the arguments 
structure:

> (apply/arguments sort
                   (arguments '("fooooo" "bar" "bazz") < #:key 
string-length))
'("bar" "bazz" "fooooo")
> (define/arguments (keywords-product args)
    (for/product ([(k v) (in-hash (arguments-keyword args))])
      v))
> (keywords-product #:foo 2 #:bar 3)
6
> (keywords-product 'ignored #:baz 6 #:blah 4)
24

-- 
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/83554d22-5863-4aa8-9d62-cbf6caef14c2%40googlegroups.com.

Reply via email to