diff --git a/lens/base/transform.rkt b/lens/base/transform.rkt index 0ea3f7e..7909070 100644 --- a/lens/base/transform.rkt +++ b/lens/base/transform.rkt @@ -7,10 +7,15 @@ (require rackunit fancy-app)) -(provide lens-transform - lens-transform*) +(provide + lens-transform* + (contract-out [lens-transform (-> lens? any/c (-> any/c any/c) any/c)])) + +(define (listof* . contracts) + (or/c '() (apply list/c (append contracts (list (apply listof* contracts)))))) + (define (lens-transform lens v f) (let-lens (view setter) lens v (setter (f view))))