Post: Practical Profunctor Lenses & Optics in PureScript


Optics and lenses are, in my opinion, one of PureScript’s killer features.

I remember @monoidmusician teaching me how to use them to deal with a horrible set of deeply-nested maps I’d set up and having one of those functional programming aha! moments. Since then I’ve found them used pervasively through production code at companies I’ve worked for, but not very much written about how to use them to solve practical problems in PureScript.

I’ve published a new article which details exactly that, walking through the most common types, functions, and constructors from the profunctor-lenses library.

If you haven’t used optics before, or if you’re still not as comfortable with them as you’d like, this article will help you become more adept using them to solve real problems in your code.

I’d love to hear what you think!

If you learned something new, please consider sharing this with your colleagues, Twitter followers, or other folks who might find it interesting and useful, too.

Thank you to @colinwahl, @JordanMartinez, @goodacre.liam, @monoidmusician, and Vance Palacio for reviewing the draft.


Really nice article, thanks!

1 Like