{"size": 950, "ext": "scrbl", "max_stars_repo_path": "kw-utils/docs/keyword-apply-sort.scrbl", "max_stars_repo_name": "AlexKnauth/kw-utils", "max_stars_repo_stars_event_min_datetime": "2015-12-07T01:34:35.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-09T23:57:57.000Z", "max_issues_repo_path": "kw-utils/docs/keyword-apply-sort.scrbl", "max_issues_repo_name": "AlexKnauth/kw-utils", "max_issues_repo_issues_event_min_datetime": "2016-01-26T22:27:53.000Z", "max_issues_repo_issues_event_max_datetime": "2017-11-26T17:45:58.000Z", "max_forks_repo_path": "kw-utils/docs/keyword-apply-sort.scrbl", "max_forks_repo_name": "AlexKnauth/kw-utils", "max_forks_repo_forks_event_min_datetime": "2016-01-26T21:28:35.000Z", "max_forks_repo_forks_event_max_datetime": "2016-09-02T17:08:40.000Z"}
{"max_stars_count": 4, "max_issues_count": 4, "max_forks_count": 2, "avg_line_length": 35.1851851852, "max_line_length": 97, "alphanum_fraction": 0.5873684211}
#lang scribble/manual
@(require kw-utils/keyword-apply-sort
          racket/base
          scribble/eval
          (for-label kw-utils/keyword-apply-sort
                     racket/base
                     racket/contract/base
                     racket/math
                     ))

@title[#:tag "keyword-apply-sort.scrbl"]{keyword-apply/sort}

@defmodule[kw-utils/keyword-apply-sort]

@defproc[(keyword-apply/sort [f procedure?] [kws (listof keyword?)] [kw-args list?]
                             [v any/c] ... [lst list?] [#:<kw> kw-arg any/c] ...) any]{
like @racket[keyword-apply], but without the constraint that the keywords in @racket[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) '())
  (keyword-apply/sort kinetic-energy '(#:velocity #:mass) '(1 2) '())
]}
