Use lens/c contracts in docs for other lens-join forms

This commit is contained in:
AlexKnauth 2015-08-30 17:35:57 -04:00
parent d13145e6ea
commit 730363fbfd
4 changed files with 6 additions and 4 deletions

View File

@ -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],

View File

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

View File

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

View File

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