Comment on Boomerang: A bidirectional programming language for ad-hoc dataparentComments−mgreenbe17yNot quite. A lens comprises three operations: get : C -> A put : A x C -> C create : A -> C And the GetPut, PutGet, CreateGet laws require of every lens that: put (get c) c = c get (put a c) = a get (create a) = a In other words, if there are no edits, then it is a round trip. The real inequality you mean is bidirectional != bijective.(EDIT: for typesetting equations.)
Comments
Not quite. A lens comprises three operations:
And the GetPut, PutGet, CreateGet laws require of every lens that: In other words, if there are no edits, then it is a round trip. The real inequality you mean is bidirectional != bijective.(EDIT: for typesetting equations.)