首页> 外文期刊>Journal of Functional Programming >A tutorial on the universality and expressiveness of fold
【24h】

A tutorial on the universality and expressiveness of fold

机译:折叠的通用性和表达性教程

获取原文
获取原文并翻译 | 示例
       

摘要

In functional programming ,fold is a standard operator that encapsulates a simple pattern of recursion for processing lists. This article is a tutorial on two key aspects of the fold operator for lists. First of all, we emphasize the use of the universal property of fold both as a proof principle that avoids the need for inductive proofs, and as a definition principle that guides the transformation of recursive functions into definitions using fold. Secondly, we show that even though the pattern of recursion encapsulated by fold is simple, in a language with tuples and functions as first-class values the fold operator has greater expressive power than might first be expected.
机译:在函数式编程中,fold是一个标准运算符,它封装了用于处理列表的简单递归模式。本文是有关列表的折叠运算符的两个关键方面的教程。首先,我们强调使用fold的通用属性既可以作为避免归纳证明的证明原理,又可以作为将递归函数转换为使用fold的定义的定义原理。其次,我们表明,即使由fold封装的递归模式很简单,在以元组和第一类值作为函数的语言中,fold运算符的表达能力也比最初预期的要强。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号