rename applicable lens parameter

fixes https://github.com/jackfirth/lens/issues/54
This commit is contained in:
AlexKnauth 2015-07-07 09:10:26 -04:00
parent a9b398a55c
commit 5b43546f97

View File

@ -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"))))