Merge pull request #57 from lexi-lambda/document-lens-thrush
Add documentation for and expose lens-thrush
This commit is contained in:
commit
1271fac527
|
@ -21,6 +21,16 @@
|
|||
(lens-set first-of-second-lens '((1 a) (2 b) (3 c)) 200)
|
||||
]}
|
||||
|
||||
@defproc[(lens-thrush [lens lens?] ...) lens?]{
|
||||
Like @racket[lens-compose], but each @racket[lens] is combined in the
|
||||
opposite order. That is, the first @racket[lens] is the first
|
||||
@racket[lens] that the compound lens’s target is viewed through.
|
||||
@lenses-examples[
|
||||
(define first-of-second-lens (lens-thrush second-lens first-lens))
|
||||
(lens-view first-of-second-lens '((1 a) (2 b) (3 c)))
|
||||
(lens-set first-of-second-lens '((1 a) (2 b) (3 c)) 200)
|
||||
]}
|
||||
|
||||
@defthing[identity-lens lens?]{
|
||||
The identity lens. Performs no destructuring at all - it's view is
|
||||
the target itself. For all lenses, both
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
apply-lens
|
||||
drop-lens
|
||||
lens-set*
|
||||
lens-thrush
|
||||
lens-transform*
|
||||
lens-view*
|
||||
list-ref-lens
|
||||
|
|
Loading…
Reference in New Issue
Block a user