provide and document set-filterer-lens
This commit is contained in:
parent
f0621c3936
commit
db0a7ba4c9
|
@ -31,13 +31,13 @@
|
|||
(examples #:eval the-eval datum (... (... ...)))))))))
|
||||
|
||||
(define-examples-form lenses-examples
|
||||
lens racket/list racket/vector racket/stream)
|
||||
lens racket/list racket/vector racket/stream racket/set)
|
||||
|
||||
(define-examples-form lenses-applicable-examples
|
||||
lens/applicable racket/list racket/vector racket/stream)
|
||||
lens/applicable racket/list racket/vector racket/stream racket/set)
|
||||
|
||||
(define-examples-form lenses-unstable-examples
|
||||
lens unstable/lens racket/list racket/vector racket/stream)
|
||||
lens unstable/lens racket/list racket/vector racket/stream racket/set)
|
||||
|
||||
(define-examples/persistance-syntax define-persistant-lenses-unstable-examples
|
||||
lens unstable/lens racket/list racket/vector racket/stream)
|
||||
lens unstable/lens racket/list racket/vector racket/stream racket/set)
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
(for-label lens
|
||||
unstable/lens
|
||||
racket/base
|
||||
racket/match
|
||||
racket/list
|
||||
racket/vector
|
||||
racket/stream
|
||||
racket/set
|
||||
racket/contract)
|
||||
(for-syntax racket/base
|
||||
syntax/parse
|
||||
|
@ -22,9 +24,11 @@
|
|||
lens
|
||||
unstable/lens
|
||||
racket/base
|
||||
racket/match
|
||||
racket/list
|
||||
racket/vector
|
||||
racket/stream
|
||||
racket/set
|
||||
racket/contract))
|
||||
(for-syntax (all-from-out
|
||||
racket/base
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"mapper.rkt"
|
||||
"string-split.rkt"
|
||||
"match.rkt"
|
||||
"set-filterer.rkt"
|
||||
)
|
||||
|
||||
(provide (all-from-out "syntax.rkt"
|
||||
|
@ -20,4 +21,5 @@
|
|||
"mapper.rkt"
|
||||
"string-split.rkt"
|
||||
"match.rkt"
|
||||
"set-filterer.rkt"
|
||||
))
|
||||
|
|
|
@ -18,3 +18,4 @@ this library being backwards-compatible.
|
|||
@include-section["mapper.scrbl"]
|
||||
@include-section["string-split.scrbl"]
|
||||
@include-section["match.scrbl"]
|
||||
@include-section["set-filterer.scrbl"]
|
||||
|
|
14
unstable/lens/set-filterer.scrbl
Normal file
14
unstable/lens/set-filterer.scrbl
Normal file
|
@ -0,0 +1,14 @@
|
|||
#lang scribble/manual
|
||||
|
||||
@(require lens/doc-util/main)
|
||||
|
||||
@title{Filtering sets}
|
||||
|
||||
@defmodule[unstable/lens/set-filterer]
|
||||
|
||||
@defproc[(set-filterer-lens [pred (-> any/c any/c)]) lens?]{
|
||||
Creates a lens that filters a set by the predicate @racket[pred].
|
||||
@lenses-unstable-examples[
|
||||
(lens-view (set-filterer-lens number?) (set 1 'a 2 'b 'c 3 'd 'e))
|
||||
(lens-set (set-filterer-lens number?) (set 1 'a 2 'b 'c 3 'd 'e) (set 4 5 6 7))
|
||||
]}
|
Loading…
Reference in New Issue
Block a user