Pierce, Benjamin C2023-05-222023-05-222007-11-272008-02-14https://repository.upenn.edu/handle/20.500.14332/6404Most programs get used in just one direction, from input to output. But sometimes, having computed an output, we need to be able to update this output and then "calculate backwards" to find a correspondingly updated input. The problem of writing such bidirectional transformations — often called lenses — arises in applications across a multitude of domains and has been attacked from many perspectives [1–12, etc.]. See [13] for a detailed survey.Adventures in Bidirectional ProgrammingArticle