Structured recursion schemes have been widely used in constructing, optimising, and reasoning about programs over inductive and coinductive datatypes. Their plain forms, catamorphisms and anamorphisms, are restricted in expressiveness. Thus many generalisations have been proposed, which further lead to several unifying frameworks of structured recursion schemes. However, the existing work on unifying frameworks typically focuses on the categorical foundation, and thus is perhaps inaccessible to practitioners who are willing to apply recursion schemes in practice but are not versed in category theory. To fill this gap, this expository paper introduces structured recursion schemes from a practical point of view: a variety of recursion schemes are motivated and explained in contexts of concrete programming examples. The categorical duals of these recursion schemes are also explained.
翻译:结构性循环计划被广泛用于构建、优化和推理关于感性数据型和感性数据型的方案,其简单形式、地貌主义和反形态主义受到明确性的限制,因此提出了许多概括性建议,从而进一步导致结构性循环计划的若干统一框架,然而,关于统一框架的现有工作通常侧重于绝对性基础,因此可能无法让那些愿意在实践中适用循环计划但又不精通分类理论的从业人员使用。为填补这一空白,这份解释性文件从实际角度介绍了结构化循环计划:各种循环计划在具体方案编制实例中都有动机和解释,还解释了这些循环计划的绝对双重性。