Skip to content

Instantly share code, notes, and snippets.

@NightRa
Last active August 29, 2015 14:05
Show Gist options
  • Save NightRa/61999b8b13b8f7d763f3 to your computer and use it in GitHub Desktop.
Save NightRa/61999b8b13b8f7d763f3 to your computer and use it in GitHub Desktop.
Optics with Monocle - Modeling the part and the whole.
Functional Programming is based on the concept of using pure functions,
which at first sight limit us from various things as I/O, mutation - change and throwing exceptions - dealing with errors or uncertainty.
Optics help us deal with change inside compound structures and with branches (as with error handling),
by providing facilities for looking into complex structures, and modifying a part of them,
as well as powerful abstractions for composing optics, in order to build even more complex systems.
In this talk, I will introduce some of the optics, as Lenses, Prisms and Isomorphisms, and the motivation behind them,
powerful use cases with Polymorphic Optics in Monocle,
and explain the deep and interesting representation of Lenses through Van Laarhoven Lenses,
building the foundation to their understanding from the ground up, including Functors, Applicatives, and typelevel Const and Identity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment