The Mondrian introduction to functional optics
marcosh.github.io·4h·
Discuss: Hacker News

In this post I’d like to try to discuss what functional optics are, without going too much into why they are so cool, and you should use them, or how they are implemented1 and should be used with a specific language and library.

I personally think that functional optics should be a really easy concept to grasp, but currently learning them is harder than it should be mostly due to library implementation details, quite obscure documentation and an exotic usage of weird symbols.

Since a picture is worth a thousand words, I will introduce and use a graphical notation to illustrate the concepts we will discuss.

Types and values

Let’s start introducing our graphical notation from its basic building blocks.

We can represent a type with a simple coloured rectangle

A val…

Similar Posts

Loading similar posts...