What is a profunctor?
Recall that a category is a directed graph equipped with an associative and unital composition of its edges. In the categorical context, the nodes of the graph are also called objects and edges are called arrows or morphisms. The unitality requirement says that each object has a unit arrow , called identity, which doesn’t affect the result of the compositions.
A functor is a composition and identity preserving graph morphism from a category to a category.
A profunctor, on the other hand, connects up two categories by (potentially) adding more morphisms in between them ‘from the outer world’. In other perspective, we can describe this setting as one of the two categories acting from the left and the other one acting from the right on the newly added morphisms. This can also be grasped as simply being a two variable functor to the category of sets, contravariant in the first argument.
Continue reading “Plenty faces of a profunctor”