Log in

Generalised folds for nested datatypes

  • Original Paper
  • Published:
Formal Aspects of Computing

Abstract.

Nested datatypes generalise regular datatypes in much the same way that context-free languages generalise regular ones. Although the categorical semantics of nested types turns out to be similar to the regular case, the fold functions are more limited because they can only describe natural transformations. Practical considerations therefore dictate the introduction of a generalised fold function in which this limitation can be overcome. In the paper we show how to construct generalised folds systematically for each nested datatype, and show that they possess a uniqueness property analogous to that of ordinary folds. As a consequence, generalised folds satisfy fusion properties similar to those developed for regular datatypes. Such properties form the core of an effective calculational theory of inductive datatypes.

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

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Author information

Authors and Affiliations

Authors

Additional information

Received September 1998 / Accepted in revised form July 1999

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bird, R., Paterson, R. Generalised folds for nested datatypes. Formal Aspects of Computing 11, 200–222 (1999). https://doi.org/10.1007/s001650050047

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s001650050047

Navigation