Merge pull request #244 from jackfirth/237-lens-join-hash-examples

Use clearer example for lens-join/hash
This commit is contained in:
Jack Firth 2015-12-03 17:52:30 -08:00
commit 43884cb0c4

View File

@ -10,8 +10,9 @@
if lenses share views later lenses take precedence when
setting.
@lens-examples[
(define a-b-lens (lens-join/hash 'a first-lens
'b third-lens))
(lens-view a-b-lens '(1 2 3))
(lens-set a-b-lens '(1 2 3) (hash 'a 100 'b 200))
(define first-third-hash-lens
(lens-join/hash 'first first-lens
'third third-lens))
(lens-view first-third-hash-lens '(1 2 3))
(lens-set first-third-hash-lens '(1 2 3) (hash 'first 100 'third 200))
]}