Skip to content

Instantly share code, notes, and snippets.

@julien-truffaut
Created February 26, 2015 16:10
Show Gist options
  • Save julien-truffaut/e9d556260e048bd0504a to your computer and use it in GitHub Desktop.
Save julien-truffaut/e9d556260e048bd0504a to your computer and use it in GitHub Desktop.
Beyond Scala Lens abstract
Beyond Scala Lens
A Lens is a functional concept which solves a very common problem: how to update a complex immutable structure. This is probably the reason why Lenses are relatively well known in functional programming languages such as haskell or scala. However, there are far less resources
available on the generalisation of Lenses known as "optics". Today, I would like to go through a few of these optics namely Iso, Prism and Optional by showing how they relate to each other as well as how to use optics in a day to day programming job.
Julien Truffaut is the author of Monocle, an optics library for scala mainly inspired by haskell lens. He also partcipates in a few open source project such as scalaz, cats or http4s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment