Skip to content
EntityQ1959790· pop 7· linked from 16 articles

catamorphism

Sign in to save

In functional programming, the concept of catamorphism (from the Ancient Greek: "downwards" and "form, shape") denotes the unique homomorphism from an initial algebra into some other algebra.

~10 min read

Article

11 sections
Contents
  • Definition
  • Terminology and history
  • Examples
  • Catamorphism for Maybe-algebra
  • List fold
  • Tree fold
  • General case
  • See also
  • References
  • Further reading
  • External links

In functional programming, the concept of catamorphism (from the Ancient Greek: "downwards" and "form, shape") denotes the unique homomorphism from an initial algebra into some other algebra.

Catamorphisms provide generalizations of folds of lists to arbitrary algebraic data types, which can be described as initial algebras. The dual concept is that of anamorphism that generalize unfolds. A hylomorphism is the composition of an anamorphism followed by a catamorphism.

Available in 7 languages

via Wikidata sitelinks · CC0

Connections

Categories