provide and document lens-join/assoc
This commit is contained in:
parent
59a1b7473a
commit
d13145e6ea
18
unstable/lens/join-assoc.scrbl
Normal file
18
unstable/lens/join-assoc.scrbl
Normal file
|
@ -0,0 +1,18 @@
|
|||
#lang scribble/manual
|
||||
|
||||
@(require lens/private/doc-util/main)
|
||||
|
||||
@title{Joining lenses with an association list}
|
||||
|
||||
@defmodule[unstable/lens/join-assoc]
|
||||
|
||||
@defproc[(lens-join/assoc [key key/c] [lens (lens/c target/c value/c)] ... ...)
|
||||
(lens/c target/c (listof (cons/c key/c value/c)))]{
|
||||
Like @racket[lens-join/hash], except joins the keys and values into an
|
||||
association list instead of a hash-table.
|
||||
@lens-unstable-examples[
|
||||
(define a-b-lens (lens-join/assoc 'a first-lens
|
||||
'b third-lens))
|
||||
(lens-view a-b-lens '(1 2 3))
|
||||
(lens-set a-b-lens '(1 2 3) '((a . 100) (b . 200)))
|
||||
]}
|
|
@ -3,6 +3,7 @@
|
|||
"dict-nested.rkt"
|
||||
"if.rkt"
|
||||
"isomorphism.rkt"
|
||||
"join-assoc.rkt"
|
||||
"mapper.rkt"
|
||||
"match.rkt"
|
||||
"set-filterer.rkt"
|
||||
|
|
|
@ -16,6 +16,7 @@ this library being backwards-compatible.
|
|||
"dict-nested.scrbl"
|
||||
"if.scrbl"
|
||||
"isomorphism.scrbl"
|
||||
"join-assoc.scrbl"
|
||||
"mapper.scrbl"
|
||||
"match.scrbl"
|
||||
"set-filterer.scrbl"
|
||||
|
|
Loading…
Reference in New Issue
Block a user