MetaCart Sign in to MyCiteSeerX

Include Citations | Advanced Search | Help

Disambiguated Search | Include Citations | Advanced Search | Help

Revisiting Catamorphisms over Datatypes with Embedded Functions (or, Programs from Outer Space) (1996) [45 citations — 3 self]

by Leonidas Fegaras ,  Tim Sheard
In Conf. Record 23rd ACM SIGPLAN/SIGACT Symp. on Principles of Programming Languages, POPL’96, St. Petersburg Beach
Add To MetaCart

Abstract:

We revisit the work of Paterson and of Meijer & Hutton, which describes how to construct catamorphisms for recursive datatype definitions that embed contravariant occurrences of the type being defined. Their construction requires, for each catamorphism, the definition of an anamorphism that has an inverse-like relationship to that catamorphism. We present an alternative construction, which replaces the stringent requirement that an inverse anamorphism be defined for each catamorphism with a more lenient restriction. The resulting construction has a more efficient implementation than that of Paterson, Meijer, and Hutton and the relevant restriction can be enforced by a HindleyMilner type inference algorithm. We provide numerous examples illustrating our method. 1 Introduction Functional programmers often use catamorphisms (or fold functions) as an elegant means of expressing algorithms over algebraic datatypes. Catamorphisms have also been used by functional programmers as a medium in ...

Citations

603 A Formulation of the Simple Theory of Types', The – Church - 1940
338 ML for the Working Programmer – Paulson - 1991
250 Functional programming with bananas, lenses, envelopes and barbed wire – Meijer, Fokkinga, et al. - 1991
224 Theorems for free – Wadler - 1989
214 C.: Higher-order abstract syntax – Pfenning, Elliott
138 Higher-order logic programming – Miller, Nadathur
104 Elements of Functional Programming – Reade - 1993
104 A Fold for All Seasons – Sheard, Fegaras - 1993
100 Data structures and program transformation – Malcolm - 1990
72 Bananas in space: Extending fold and unfold to exponential types. Pages 324–333 of: Fpca95: Conference on functional programming languages and computer architecture – Meijer, Hutton - 1995
35 Homomorphisms and promotability – Malcolm - 1989
25 Improving Programs which Recurse over Multiple Inductive Structures – Fegaras, Sheard, et al. - 1994
11 Solving optimisation problems with catamorphisms – Bird, Moor - 1992
1 Control Structures from Types. Unpublished draft. Available by anonymous ftp from ftp-ala.doc.ic.ac.uk/pub/papers/R.Paterson/folds.dvi – Paterson - 1994
1 Control Structures from Types. Submitted to – Paterson - 1994