A Clear Picture of Lens Laws - Functional Pearl
暂无分享,去创建一个
A lens is an optical device which refracts light. Properly adjusted, it can be used to project sharp images of objects onto a screen—a principle underlying photography as well as human vision. Striving for clarity, we shift our focus to lenses as abstractions for bidirectional programming. By means of standard mathematical terminology as well as intuitive properties of bidirectional programs, we observe different ways to characterize lenses and show exactly how their laws interact. Like proper adjustment of optical lenses is essential for taking clear pictures, proper organization of lens laws is essential for forming a clear picture of different lens classes. Incidentally, the process of understanding bidirectional lenses clearly is quite similar to the process of taking a good picture.
[1] Benjamin C. Pierce,et al. Combinators for bi-directional tree transformations: a linguistic approach to the view update problem , 2005, POPL '05.
[2] Richard S. Bird,et al. Introduction to functional programming , 1988, Prentice Hall International series in computer science.
[3] Richard S. Bird,et al. Introduction to functional programming using haskeu , 1998 .
[4] Benjamin C. Pierce,et al. Bidirectional programming languages , 2009 .