replace inverse-function-lens with isomorphism-lens
This commit is contained in:
parent
78a65def02
commit
8c40c843af
|
@ -1,11 +0,0 @@
|
|||
#lang racket/base
|
||||
|
||||
(require "../base/main.rkt")
|
||||
|
||||
(provide inverse-function-lens)
|
||||
|
||||
|
||||
(define (inverse-function-lens f f-inv)
|
||||
(make-lens
|
||||
(λ (tgt) (f tgt))
|
||||
(λ (tgt v) (f-inv v))))
|
|
@ -4,7 +4,7 @@
|
|||
"../base/main.rkt"
|
||||
"../util/immutable.rkt"
|
||||
"compose.rkt"
|
||||
"inverse-function-lens.rkt"
|
||||
unstable/lens/isomorphism/base
|
||||
"join-list.rkt")
|
||||
|
||||
(module+ test
|
||||
|
@ -20,7 +20,7 @@
|
|||
(lens-compose list->string-lens (apply lens-join/list lenses)))
|
||||
|
||||
(define list->string-lens
|
||||
(inverse-function-lens list->immutable-string string->list))
|
||||
(isomorphism-lens list->immutable-string string->list))
|
||||
|
||||
(module+ test
|
||||
(define string-first-third-fifth-lens
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"../base/main.rkt"
|
||||
"../util/immutable.rkt"
|
||||
"compose.rkt"
|
||||
"inverse-function-lens.rkt"
|
||||
unstable/lens/isomorphism/base
|
||||
"join-list.rkt")
|
||||
|
||||
(module+ test
|
||||
|
@ -20,7 +20,7 @@
|
|||
(lens-compose list->vector-lens (apply lens-join/list lenses)))
|
||||
|
||||
(define list->vector-lens
|
||||
(inverse-function-lens list->immutable-vector vector->list))
|
||||
(isomorphism-lens list->immutable-vector vector->list))
|
||||
|
||||
(module+ test
|
||||
(define vector-first-third-fifth-lens
|
||||
|
|
Loading…
Reference in New Issue
Block a user