{"size": 932, "ext": "scrbl", "max_stars_repo_path": "kw-utils/docs/mapper.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/mapper.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/mapper.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": 30.064516129, "max_line_length": 89, "alphanum_fraction": 0.5461373391}
#lang scribble/manual

@(require scribble/eval
          (for-label kw-utils/mapper
                     kw-utils/partial
                     kw-utils/kw-map
                     (except-in racket/base map)
                     racket/contract/base
                     racket/function
                     ))

@title{Creating functions that map over lists}

@defmodule[kw-utils/mapper]

@defproc*[([(mapper [f procedure?] [arg any/c] ... [#:<kw> kw-arg any/c] ...) procedure?]
           [(mapper [#:<kw> kw-arg any/c] ...) procedure?])]{
The one-argument case is equivalent to a curried version of @racket[map].

@racket[(mapper f)] is equivalent to @racket[(partial map f)], and
@racket[(mapper arg ...)] is equivalent to
@racket[(partial map (partial arg ...))].
@examples[
  (require kw-utils/mapper)
  ((mapper add1) '(1 2 3))
  ((mapper +) '(1 2 3) '(4 5 6))
  ((mapper + 3) '(1 2 3))
  ((mapper + 3) '(1 2 3) '(4 5 6))
]}

