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.
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.