Understanding Actegories: The Hidden Math Behind Lenses and Prisms
Actegories
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."