Fix a few trivial typos.
This commit is contained in:
parent
2d5c736df4
commit
9600e57fee
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
@defproc[(assoc-lens [key any/c] [#:is-equal? key-equal? (-> any/c any/c any/c) equal?])
|
@defproc[(assoc-lens [key any/c] [#:is-equal? key-equal? (-> any/c any/c any/c) equal?])
|
||||||
lens?]{
|
lens?]{
|
||||||
Constructs a lens for examiniming association lists.
|
Constructs a lens for examining association lists.
|
||||||
Specifically, for a given association list the returned
|
Specifically, for a given association list the returned
|
||||||
lens examines the second value of the first pair that
|
lens examines the second value of the first pair that
|
||||||
has a key that is @racket[key-equal?] to @racket[key].
|
has a key that is @racket[key-equal?] to @racket[key].
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
eighth-lens
|
eighth-lens
|
||||||
ninth-lens
|
ninth-lens
|
||||||
tenth-lens)]{
|
tenth-lens)]{
|
||||||
Lenses for examiniming specific items of lists. Shorthands
|
Lenses for examining specific items of lists. Shorthands
|
||||||
for the common use cases of @racket[list-ref-lens].
|
for the common use cases of @racket[list-ref-lens].
|
||||||
@lens-examples[
|
@lens-examples[
|
||||||
(lens-view third-lens '(a b c d))
|
(lens-view third-lens '(a b c d))
|
||||||
|
|
|
@ -50,8 +50,8 @@ create a lens that performs indexed lookups for nested lists using only @racket[
|
||||||
This can also be generalized to @emph{n}-dimensional lists:
|
This can also be generalized to @emph{n}-dimensional lists:
|
||||||
|
|
||||||
@(lens-interaction
|
@(lens-interaction
|
||||||
(define (list-ref-lens* . indicies)
|
(define (list-ref-lens* . indices)
|
||||||
(apply lens-compose (map list-ref-lens indicies)))
|
(apply lens-compose (map list-ref-lens indices)))
|
||||||
(lens-set (list-ref-lens* 0 1 0)
|
(lens-set (list-ref-lens* 0 1 0)
|
||||||
'(((a b) (c d))
|
'(((a b) (c d))
|
||||||
((e f) (g h)))
|
((e f) (g h)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user