Use lens/c contracts in docs for other lens-join forms
This commit is contained in:
parent
d13145e6ea
commit
730363fbfd
|
@ -3,7 +3,8 @@
|
|||
@(require "../doc-util/main.rkt")
|
||||
|
||||
|
||||
@defproc[(lens-join/hash [key any/c] [lens lens?] ... ...) lens?]{
|
||||
@defproc[(lens-join/hash [key key/c] [lens (lens/c target/c value/c)] ... ...)
|
||||
(lens/c target/c (hash/c key/c value/c #:immutable #t))]{
|
||||
Constructs a lens that combines the view of each
|
||||
@racket[lens] into a hash of views with @racket[key]s
|
||||
as the hash keys. In the same manner as @racket[lens-join/list],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@(require "../doc-util/main.rkt")
|
||||
|
||||
@defproc[(lens-join/list [lens lens?] ...) lens?]{
|
||||
@defproc[(lens-join/list [lens (lens/c target/c item/c)] ...) (lens/c target/c (listof item/c))]{
|
||||
Constructs a lens that combines the view of each
|
||||
@racket[lens] into a list of views. This lens can
|
||||
be used to view and set a list of values in a single
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
@(require "../doc-util/main.rkt")
|
||||
|
||||
|
||||
@defproc[(lens-join/string [lens lens?] ...) lens?]{
|
||||
@defproc[(lens-join/string [lens (lens/c target/c char?)] ...) (lens/c target/c immutable-string?)]{
|
||||
Like @racket[lens-join/list], except the view is a string, not a list.
|
||||
Each @racket[lens] argument must return a @racket[char?] as a view.
|
||||
@lens-examples[
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
@(require "../doc-util/main.rkt")
|
||||
|
||||
|
||||
@defproc[(lens-join/vector [lens lens?] ...) lens?]{
|
||||
@defproc[(lens-join/vector [lens (lens/c target/c item/c)] ...)
|
||||
(lens/c target/c (vector-immutableof item/c))]{
|
||||
Like @racket[lens-join/list], except the view is a vector, not a list.
|
||||
@lens-examples[
|
||||
(define vector-first-third-fifth-lens
|
||||
|
|
Loading…
Reference in New Issue
Block a user