Professor GRAHAM HUTTON GRAHAM.HUTTON@NOTTINGHAM.AC.UK
Professor of Computer Science
A Tutorial on the Universality and Expressiveness of Fold
Hutton, Graham
Authors
Abstract
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.
Citation
Hutton, G. (1999). A Tutorial on the Universality and Expressiveness of Fold. Journal of Functional Programming, 9(4), https://doi.org/10.1017/s0956796899003500
Journal Article Type | Article |
---|---|
Publication Date | Jul 1, 1999 |
Deposit Date | Oct 26, 2005 |
Publicly Available Date | Oct 9, 2007 |
Journal | Journal of Functional Programming |
Print ISSN | 0956-7968 |
Electronic ISSN | 1469-7653 |
Publisher | Cambridge University Press |
Peer Reviewed | Peer Reviewed |
Volume | 9 |
Issue | 4 |
DOI | https://doi.org/10.1017/s0956796899003500 |
Public URL | https://nottingham-repository.worktribe.com/output/1023844 |
Files
fold.pdf
(192 Kb)
PDF
You might also like
Calculating correct compilers
(2015)
Journal Article
Cutting out continuations
(2016)
Presentation / Conference Contribution
Towards a theory of reach
(2016)
Journal Article
Failing faster: overlapping patterns for property-based testing
(2017)
Presentation / Conference Contribution
Work it, wrap it, fix it, fold it
(2014)
Journal Article
Downloadable Citations
About Repository@Nottingham
Administrator e-mail: discovery-access-systems@nottingham.ac.uk
This application uses the following open-source libraries:
SheetJS Community Edition
Apache License Version 2.0 (http://www.apache.org/licenses/)
PDF.js
Apache License Version 2.0 (http://www.apache.org/licenses/)
Font Awesome
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2024
Advanced Search