Skip to content

Instantly share code, notes, and snippets.

@wigahluk
wigahluk / Optics References.md
Last active October 29, 2021 13:26
Optics References

Optics, Lenses, Profunctors and related beasts

I got interested in lenses because I was looking for a better way to handle state in front end applications (ELM Architecture and Redux were nice ideas but using Elm or PureScript face some management obstacles and Redux lacks types and more explicit composition). Studying them I found profunctors and the more I knew about them both the more interested I was. Now I look at optics as profunctor transformations that can be applied to a much wider menu of use cases than data accessors for nested structures.

This Gist is my collection of shortcuts to several resources here and there that either I consult frequently or I recommend frequently.

Profunctor presentation

Optics as profunctor transformations are in correspondence with the profunctorial restrictions and have the following