Skip to content

Commit

Permalink
document sublist-lens and add it to main.rkt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Jul 11, 2015
1 parent 2ac16f4 commit 1fd5a60
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unstable/lens/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
))
1 change: 1 addition & 0 deletions unstable/lens/main.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
13 changes: 13 additions & 0 deletions unstable/lens/sublist.scrbl
Original file line number Diff line number Diff line change
@@ -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))
]}

0 comments on commit 1fd5a60

Please sign in to comment.