Abstract
An important element in functional programming is the fold (also known as reduce). A fold represents a set of higher-order functions that operate on recursive data structures and take a combining operation as one of the parameters, recombining the results of recursive operations in order to build a return value. In this chapter, you will learn to use fold functions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The example is taken from http://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html .
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Stefania Loredana Nita and Marius Mihailescu
About this chapter
Cite this chapter
Nita, S.L., Mihailescu, M. (2019). Folds. In: Haskell Quick Syntax Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4507-1_15
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4507-1_15
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4506-4
Online ISBN: 978-1-4842-4507-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)