provide and document mapper-lens
This commit is contained in:
parent
19c6723e28
commit
441d790844
|
@ -5,6 +5,7 @@
|
|||
"sublist.rkt"
|
||||
"arrow.rkt"
|
||||
"isomorphism.rkt"
|
||||
"mapper.rkt"
|
||||
)
|
||||
|
||||
(provide (all-from-out "syntax.rkt"
|
||||
|
@ -12,4 +13,5 @@
|
|||
"sublist.rkt"
|
||||
"arrow.rkt"
|
||||
"isomorphism.rkt"
|
||||
"mapper.rkt"
|
||||
))
|
||||
|
|
|
@ -14,3 +14,4 @@ this library being backwards-compatible.
|
|||
@include-section["sublist.scrbl"]
|
||||
@include-section["arrow.scrbl"]
|
||||
@include-section["isomorphism.scrbl"]
|
||||
@include-section["mapper.scrbl"]
|
||||
|
|
15
unstable/lens/mapper.scrbl
Normal file
15
unstable/lens/mapper.scrbl
Normal file
|
@ -0,0 +1,15 @@
|
|||
#lang scribble/manual
|
||||
|
||||
@(require lens/doc-util/main)
|
||||
|
||||
@title{Lenses that map over lists}
|
||||
|
||||
@defmodule[unstable/lens/mapper]
|
||||
|
||||
@defproc[(mapper-lens [lens lens?]) lens?]{
|
||||
Creates a lens that maps @racket[lens] over a target list.
|
||||
@lenses-unstable-examples[
|
||||
(lens-view (mapper-lens first-lens) '((a b) (c d) (e f)))
|
||||
(lens-set (mapper-lens first-lens) '((a b) (c d) (e f)) '(1 2 3))
|
||||
(lens-transform (mapper-lens first-lens) '((a b) (c d) (e f)) (λ (xs) (map symbol->string xs)))
|
||||
]}
|
Loading…
Reference in New Issue
Block a user