针对函数式编程中的共归纳数据类型上的各种共递归操作缺乏统一描述的问题,利用Monads及其与共代数函子之间的分配律给出了共归纳数据类型上的一种广义共迭代定义——gunfold,证明了gunfold可以为共迭代、原始共递归和Course-of-Value共迭代提供一种统一和抽象的描述.在此基础上进一步从范畴论的角度分析了gunfold上的各种性质和计算律.
Due to a lack of general descriptions of various corecursion operations defined on coinductive data types in functional programming, gunfold, a definition of generalised coiteration for coinductive data types, is proposed based on Monads and its distributive laws on coalgebraic functors. It is proved that gunfold can offer a general and abstract description of the coiteration, the primitive corecursion and the course-of-value eoiteration. Based on the proof, the properties and the relevant calculation laws for gunfold are analyzed from the viewpoint of the category theory.