Understanding Actegories: The Hidden Math Behind Lenses and Prisms

Actegories

4ibobev💬 0
Understanding Actegories: The Hidden Math Behind Lenses and Prisms

I explore actegories, a mathematical concept central to programming optics like lenses and prisms. By defining monoidal categories and their actions on other categories, I show how these structures model 'scaling' operations. Using Haskell, I demonstrate how to implement these abstract ideas, revealing the elegant algebraic foundations that power modern functional programming patterns.

"In programming, actegories play a central role in optics: lenses, prisms, traversals, etc."

More from this day · 2026-07-14