Skip to content

Instantly share code, notes, and snippets.

@julien-truffaut
Last active October 11, 2015 21:15
Show Gist options
  • Save julien-truffaut/e7e68dc64d183298a7d7 to your computer and use it in GitHub Desktop.
Save julien-truffaut/e7e68dc64d183298a7d7 to your computer and use it in GitHub Desktop.
Abstract for Scala Matsuri 2016

Van Laarhoven Lens

A Lens is a functional concept that permits to zoom in a data structure. A key point of Lenses is that they compose together such as you can drill deeper and deeper in your data. Once you arrive at the level you are interested in, you can either extract or modify (even effectfully!) the value you targeted.

In this presentation, I would like to go through a specific Lens implementation known as Van Laarhoven Lenses. This implementation is particularly interesting because it defines Lenses as a unique function! The game is to find out how can we derive all Lens methods from this simple function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment