Beyond Scala Lenses—Julien Truffaut45:37 4487 views 100% Published 4 years ago
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 generalization of Lenses known as "Optics".
I would like to go through a few of these optics, namely Iso, Prism and Optional. My goal is to show how they relate to each other and how they can be used in common programming tasks.