Generalized Iteration and Coiteration for Higher-Order Nested Datatypes

  • Andreas Abel
  • Ralph Matthes
  • Tarmo Uustalu
Conference paper

DOI: 10.1007/3-540-36576-1_4

Part of the Lecture Notes in Computer Science book series (LNCS, volume 2620)
Cite this paper as:
Abel A., Matthes R., Uustalu T. (2003) Generalized Iteration and Coiteration for Higher-Order Nested Datatypes. In: Gordon A.D. (eds) Foundations of Software Science and Computation Structures. FoSSaCS 2003. Lecture Notes in Computer Science, vol 2620. Springer, Berlin, Heidelberg

Abstract

We solve the problem of extending Bird and Paterson’s generalized folds for nested datatypes and its dual to inductive and coinductive constructors of arbitrarily high ranks by appropriately generalizing Mendler-style (co)iteration.Characteristically to Mendler-style schemes of disciplined (co)recursion,the schemes we propose do not rest on notions like positivity or monotonicity of a constructor and facilitate programming in a natural and elegant style close to programming with the customary letrec construct,where the typings of the schemes,however, guarantee termination. For rank 2,a smoothened version of Bird and Paterson's generalized folds and its dual are achieved;for rank 1,the schemes instantiate to Mendler's original (re)formulation of iteration and coiteration. Several examples demonstrate the power of the approach. Strong normalization of our proposed extension of system Fω of higher-order parametric polymorphism is proven by a reduction-preserving embedding into pure Fω.

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Andreas Abel
    • 1
  • Ralph Matthes
    • 2
  • Tarmo Uustalu
    • 3
  1. 1.Department of Computer ScienceUniversity of MunichMunich
  2. 2.Preuves, Programmes et SystèmesCNRS, Université Paris VII (on leave from University of Munich)Munich
  3. 3.Inst.of CyberneticsTallinn Technical UniversityTallinn

Personalised recommendations