{"size": 2513, "ext": "scrbl", "max_stars_repo_path": "lens-doc/unstable/lens/arrow.scrbl", "max_stars_repo_name": "AlexKnauth/lens", "max_stars_repo_stars_event_min_datetime": "2015-07-08T12:56:46.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-17T21:21:54.000Z", "max_issues_repo_path": "lens-doc/unstable/lens/arrow.scrbl", "max_issues_repo_name": "AlexKnauth/lens", "max_issues_repo_issues_event_min_datetime": "2015-07-07T01:47:59.000Z", "max_issues_repo_issues_event_max_datetime": "2019-09-10T18:35:17.000Z", "max_forks_repo_path": "lens-doc/unstable/lens/arrow.scrbl", "max_forks_repo_name": "AlexKnauth/lens", "max_forks_repo_forks_event_min_datetime": "2015-07-07T05:01:29.000Z", "max_forks_repo_forks_event_max_datetime": "2019-07-16T00:37:04.000Z"}
{"max_stars_count": 66, "max_issues_count": 199, "max_forks_count": 11, "avg_line_length": 50.26, "max_line_length": 101, "alphanum_fraction": 0.6346995623}
#lang scribble/manual

@(require lens/private/doc-util/main)

@title{lens-view/thrush, lens-set/thrush, and lens-transform/thrush}

@deftogether[[@defproc[(lens-view/thrush [target any/c] [lens lens?] ...) any/c]
              @defproc[(lens-view~> [target any/c] [lens lens?] ...) any/c]]]{
Like @racket[lens-view], except that it can take multiple lenses,
which are combined into a nested lens. The argument order is
switched, so that the @racket[target] comes first and the
@racket[lens] arguments come after it.
@racket[(lens-view/thrush target lens ...)] produces the same value as
@racket[(lens-view (lens-thrush lens ...) target)], but can be more
efficient.
The function @racket[lens-view~>] is provided as a shorter version.
@lens-unstable-examples[
  (lens-view/thrush '(a b ((c d) e f) g) third-lens first-lens second-lens)
  (lens-view~> '(a b ((c d) e f) g) third-lens first-lens second-lens)
]}

@deftogether[[@defproc[(lens-set/thrush [target any/c] [lens lens?] ... [#:-> new-view any/c]) any/c]
              @defproc[(lens-set~> [target any/c] [lens lens?] ... [#:-> new-view any/c]) any/c]]]{
Like @racket[lens-set], except that it can take multiple lenses,
which again are combined into a nested lens.
@racket[(lens-set/thrush target lens ... #:-> new-view)] is equivalent
to @racket[(lens-set (lens-thrush lens ...) target new-view)], and
@racket[lens-set~>] is the shorter version.
@lens-unstable-examples[
  (lens-set/thrush '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> "sea")
  (lens-set~> '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> "sea")
]}

@deftogether[[@defproc[(lens-transform/thrush [target any/c] [lens lens?] ...
                                              [#:-> transformer (-> any/c any/c)])
                       any/c]
              @defproc[(lens-transform~> [target any/c] [lens lens?] ...
                                         [#:-> transformer (-> any/c any/c)])
                       any/c]]]{
Like @racket[lens-transform], except that it can take multiple lenses,
just like @racket[lens-set/thrush].
@racket[(lens-transform/thrush target lens ... #:-> transformer)] is
equivalent to
@racket[(lens-transform (lens-thrush lens ...) target transformer)],
and @racket[lens-transform~>] is the shorter verison.
@lens-unstable-examples[
  (lens-transform/thrush '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> symbol->string)
  (lens-transform~> '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> symbol->string)
]}
