{"size": 1383, "ext": "scrbl", "max_stars_repo_path": "kw-utils/docs/kw-lists-lambda.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/kw-lists-lambda.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/kw-lists-lambda.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": 25.1454545455, "max_line_length": 63, "alphanum_fraction": 0.5177151121}
#lang scribble/manual

@(require racket/base
          scribble/eval
          (for-label kw-utils/kw-lists-lambda
                     kw-utils/keyword-lambda
                     racket/base))

@title[#:tag "kw-lists-lambda.scrbl"]{kw-lists-lambda}

@defmodule[kw-utils/kw-lists-lambda]

@defform[(kw-lists-lambda kws kw-args args body ...)
         #:grammar ([args (arg ...)
                          (arg ... . rest-id)
                          rest-id]
                    [arg arg-id
                         [arg-id default-expr]])]{
roughly equivalent to
@(racketblock
  (make-keyword-procedure
   (lambda (kws kw-args . args) body ...))
  )

@examples[
  (require kw-utils/kw-lists-lambda)
  (define proc
    (kw-lists-lambda kws kw-args rest-args
      (list kws kw-args rest-args)))
  (proc #:a 'a #:b 'b 0 1 2)
]}

@defform[(kw-lists-case-lambda kws kw-args [args body ...] ...)
         #:grammar ([args (arg-id ...)
                          (arg-id ... . rest-id)
                          rest-id])]{
roughly equivalent to
@(racketblock
  (make-keyword-procedure
   (case-lambda [(kws kw-args . args) body ...] ...))
  )

@examples[
  (require kw-utils/kw-lists-lambda)
  (define proc
    (kw-lists-case-lambda kws kw-args
      [(a)
       (list kws kw-args a)]
      [(a b)
       (list kws kw-args a b)]))
  (proc #:a 'a #:b 'b 0)
  (proc #:a 'a #:b 'b 0 1)
]}

