diff --git a/unstable/lens/main.rkt b/unstable/lens/main.rkt index b657015..3ffba54 100644 --- a/unstable/lens/main.rkt +++ b/unstable/lens/main.rkt @@ -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" + )) diff --git a/unstable/lens/main.scrbl b/unstable/lens/main.scrbl index 90299a2..3b525f3 100644 --- a/unstable/lens/main.scrbl +++ b/unstable/lens/main.scrbl @@ -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"] diff --git a/unstable/lens/sublist.scrbl b/unstable/lens/sublist.scrbl new file mode 100644 index 0000000..c78be0b --- /dev/null +++ b/unstable/lens/sublist.scrbl @@ -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)) +]}