一句话:把 monad、applicative functor 和 arrow 统一为 monoidal 范畴中的幺半群,并给出自由幺半群与 Cayley 表示及关系分析。
论文关注 monad、applicative functor 和 arrow 这三种常见计算概念缺乏统一理论基础的问题。作者在 monoidal category 层面将它们刻画为幺半群,从而以同一抽象框架描述三者。文章进一步给出在 monoidal category 中获得自由幺半群和 Cayley 表示的条件,并表明这些高阶构造具体化到 monad、applicative functor 和 arrow 后能产生有用的构造。借助这一统一表述,论文还提出一种有原则的方法来分析三种计算概念之间的关系。结果说明即使在高抽象层次上工作,也能得到对函数式编程具有实际意义的结论。
Abstract There are different notions of computation, the most popular being monads, applicative functors, and arrows. In this article, we show that these three notions can be seen as instances of a unifying abstract concept: monoids in monoidal categories. We demonstrate that even when working at this high level of generality, one can obtain useful results. In particular, we give conditions under which one can obtain free monoids and Cayley representations at the level of monoidal categories, and we show that their concretisation results in useful constructions for monads, applicative functors, and arrows. Moreover, by taking advantage of the uniform presentation of the three notions of computation, we introduce a principled approach to the analysis of the relation between them.