{"size": 1005, "ext": "scrbl", "max_stars_repo_path": "lens-doc/lens/private/list/list-ref-take-drop.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/lens/private/list/list-ref-take-drop.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/lens/private/list/list-ref-take-drop.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": 27.1621621622, "max_line_length": 63, "alphanum_fraction": 0.6009950249}
#lang scribble/manual

@(require lens/private/doc-util/main
          lens/private/doc-util/scribble-include-no-subsection)


@title{List lenses}

@defproc[(list-ref-lens [n exact-nonnegative-integer?])
         lens?]{
  Returns a lens for viewing the @racket[n]th item of a list,
  with indexing starting from zero.
  @lens-examples[
    (lens-view (list-ref-lens 3) '(a b c d e f g h))
    (lens-set (list-ref-lens 1) '(a b c d e f g h) 'FOO)
]}

@deflenses[(first-lens
            second-lens
            third-lens
            fourth-lens
            fifth-lens
            sixth-lens
            seventh-lens
            eighth-lens
            ninth-lens
            tenth-lens)]{
  Lenses for examining specific items of lists. Shorthands
  for the common use cases of @racket[list-ref-lens].
  @lens-examples[
    (lens-view third-lens '(a b c d))
    (lens-view (lens-compose second-lens fourth-lens)
               '((a 1) (b 2) (c 3) (d 4)))
]}

@scribble-include/no-subsection["multi.scrbl"]
