Skip to content

Commit

Permalink
Merge pull request #76 from jackfirth/fix-struct-lens-#46
Browse files Browse the repository at this point in the history
Rename struct-lens module
  • Loading branch information
jackfirth committed Jul 7, 2015
2 parents 0328088 + 7c8c1c4 commit eb8da3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lens/main.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ source code: @url["https://github.com/jackfirth/lens"]

@include-section["base/main.scrbl"]
@include-section["list/main.scrbl"]
@include-section["struct-lens.scrbl"]
@include-section["struct.scrbl"]
@include-section["syntax.scrbl"]
@include-section["applicable.scrbl"]
File renamed without changes.
7 changes: 3 additions & 4 deletions lens/struct-lens.scrbl → lens/struct.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
@(require scribble/eval
"lenses-examples.rkt"
(for-label lens
lens/struct-lens
lens/struct
racket/base
racket/contract))


@title{Struct lenses}

@defmodule[lens/struct-lens]
@defmodule[lens/struct]

@defform[(struct-lens struct-id field-id)]{
Returns a lens for viewing the @racket[field-id] field of
a @racket[struct-id] instance.
@lenses-examples[
(require lens/struct-lens)
(require lens/struct)
(struct foo (a b c) #:transparent)
(lens-view (struct-lens foo a) (foo 1 2 3))
(lens-set (struct-lens foo a) (foo 1 2 3) 100)
]}

0 comments on commit eb8da3b

Please sign in to comment.