The Logic of Functional Programming
In this post I describe my own journey getting in to functional programming. Early on I gained a deep fascination with functional lenses, and their ability to let us focus on a portion of a data structure. Yet it seems to me that this should be part of a larger logical theory of functions.<p>If we can peer in to focus in on parts a data structure, we should also be able to focus in on parts of functions. To expose how functions behave relative to parts of structures like those determined by lenses. I describe how commutative squares let you do that. A large assortment of references is provided at the end for interested parties who want to know more.