Skip to content

Commit

Permalink
Merge 5b43546 into ccd81c5
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Jul 7, 2015
2 parents ccd81c5 + 5b43546 commit 7f907c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lens/core/base.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
(rename-out [lens-struct? lens?]))


(define lens-app-context? (make-parameter #f))
(define lenses-applicable? (make-parameter #f))

(define (use-applicable-lenses!)
(lens-app-context? #t))
(lenses-applicable? #t))

(struct lens-struct (get set)
#:property prop:procedure
(lambda (this target)
(if (lens-app-context?)
(if (lenses-applicable?)
((lens-struct-get this) target)
(error "cannot apply a non-applicable lens as a function"))))

Expand Down

0 comments on commit 7f907c7

Please sign in to comment.