Skip to main content

Folds

  • Chapter
  • First Online:
Haskell Quick Syntax Reference

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Stefania Loredana Nita and Marius Mihailescu

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics