Considering freelancing? Check out the contract positions from Toughbyte.

Compositional data manipulation using lenses

Lenses are a simple and powerful abstraction for updating and querying immutable data structures. A lens can be seen as a path to focus on an element of a data structure. The lens can then be used to both read the focused element and to substitute a new element into the focus, creating a new data structure. Lenses allow one to create complex data manipulation operations from simple parts.

Lenses can be useful whenever there is a need to manipulate elements of immutable data structures. We have used lenses to solve both client and server side data manipulation problems.

In this talk I'll introduce lenses and some related concepts and show how to use a library of partial lenses.