Fold operators capture a common recursion pattern over algebraic datatypes. A fold essentially replaces constructors by functions. However, if the datatype is parameterized, the corresponding fold operates on polymorphic functions which severely limits its applicability. In order to overcome this limitation R. Bird and R. Paterson (Bird and Paterson, 1999b) have proposed so-called generalized folds. We show how to define a variation of these folds by induction on the structure of datatype definitions. Unfortunately, for some datatypes generalized folds are less efficient than one would expect. We identify the source of inefficiency and explain how to remedy this shortcoming. While conceptually simple, our approach places high demands on the...
Modem functional languages feature polymorphic types whose data structures must be fixed, though the...
In functional programming, fold is a standard operator that encapsulates a simple pattern of recursi...
We extend the structured recursive programming discipline, which favors the use of fold operations i...
Nested (or non-uniform, or non-regular) datatypes have recursive definitions in which the type param...
Nested (or non-uniform, or non-regular) datatypes have recursive definitions in which the type param...
Abstract. Nested datatypes generalise regular datatypes in much the same way that context-free langu...
Defining functions over large, possibly recursive, data structures usually involves a lot of boilerp...
AbstractDefining functions over large, possibly recursive, data structures usually involves a lot of...
This paper describes structural polymorphism, a new form of type polymorphism appropriate to functio...
Fold and unfold are general purpose functionals for processing and constructing lists. By using the ...
International audienceWe propose a type system based on regular tree grammars, where algebraic datat...
The theory and practice of polytypic programming is intimately connected with the initial algebra se...
The theory and practice of polytypic programming is intimately connected with the initial algebra se...
A functional polytypic program is one that is parameterised by datatype. Since polytypic functions a...
AbstractMeijer, Fokkinga, and Paterson introduced several recursion operators associated with data t...
Modem functional languages feature polymorphic types whose data structures must be fixed, though the...
In functional programming, fold is a standard operator that encapsulates a simple pattern of recursi...
We extend the structured recursive programming discipline, which favors the use of fold operations i...
Nested (or non-uniform, or non-regular) datatypes have recursive definitions in which the type param...
Nested (or non-uniform, or non-regular) datatypes have recursive definitions in which the type param...
Abstract. Nested datatypes generalise regular datatypes in much the same way that context-free langu...
Defining functions over large, possibly recursive, data structures usually involves a lot of boilerp...
AbstractDefining functions over large, possibly recursive, data structures usually involves a lot of...
This paper describes structural polymorphism, a new form of type polymorphism appropriate to functio...
Fold and unfold are general purpose functionals for processing and constructing lists. By using the ...
International audienceWe propose a type system based on regular tree grammars, where algebraic datat...
The theory and practice of polytypic programming is intimately connected with the initial algebra se...
The theory and practice of polytypic programming is intimately connected with the initial algebra se...
A functional polytypic program is one that is parameterised by datatype. Since polytypic functions a...
AbstractMeijer, Fokkinga, and Paterson introduced several recursion operators associated with data t...
Modem functional languages feature polymorphic types whose data structures must be fixed, though the...
In functional programming, fold is a standard operator that encapsulates a simple pattern of recursi...
We extend the structured recursive programming discipline, which favors the use of fold operations i...