6.3.90.900
2 keyword-apply/sort
(require kw-utils/keyword-apply-sort) | package: kw-utils |
procedure
(keyword-apply/sort f kws kw-args v ... lst #:<kw> kw-arg ...) → any f : procedure? kws : (listof keyword?) kw-args : list? v : any/c lst : list? kw-arg : any/c
like keyword-apply, but without the constraint that the keywords in kws must be
sorted.
Examples:
> (require kw-utils/keyword-apply-sort racket/math)
> (define (kinetic-energy #:mass m #:velocity v) (* 1/2 m (sqr v)))
> (keyword-apply/sort kinetic-energy '(#:mass #:velocity) '(2 1) '()) 1
> (keyword-apply/sort kinetic-energy '(#:velocity #:mass) '(1 2) '()) 1