Merge pull request #57 from lexi-lambda/document-lens-thrush

Add documentation for and expose lens-thrush
This commit is contained in:
Jack Firth 2015-07-06 16:12:35 -07:00
commit 1271fac527
2 changed files with 10 additions and 1 deletions

View File

@ -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 lenss 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

View File

@ -16,7 +16,6 @@
apply-lens
drop-lens
lens-set*
lens-thrush
lens-transform*
lens-view*
list-ref-lens