document sublist-lens and add it to unstable/lens

This commit is contained in:
AlexKnauth 2015-07-10 23:32:14 -04:00
parent 2ac16f4c82
commit 9382b739fe
3 changed files with 20 additions and 2 deletions

View File

@ -4,10 +4,14 @@
"compound.rkt"
"list.rkt"
"hash.rkt"
"view-set.rkt")
"view-set.rkt"
"sublist.rkt"
)
(provide (all-from-out "syntax.rkt"
"compound.rkt"
"list.rkt"
"hash.rkt"
"view-set.rkt"))
"view-set.rkt"
"sublist.rkt"
))

View File

@ -14,3 +14,4 @@ this library being backwards-compatible.
@include-section["list.scrbl"]
@include-section["hash.scrbl"]
@include-section["syntax.scrbl"]
@include-section["sublist.scrbl"]

View File

@ -0,0 +1,13 @@
#lang scribble/manual
@(require lens/doc-util/main)
@title{Sublist lenses}
@defmodule[unstable/lens/sublist]
@defproc[(sublist-lens [i exact-nonnegative-integer?] [j exact-nonnegative-integer?]) lens?]{
@lenses-unstable-examples[
(lens-view (sublist-lens 1 4) '(0 1 2 3 4 5))
(lens-set (sublist-lens 1 4) '(0 1 2 3 4 5) '(a b c))
]}