Results

**11 - 13**of**13**### unknown title

"... FOLD combinator. In an APLAS 2004 paper [1],we described an alternative equivalent semantics of inductive types as limits of algebra structure forgetting functors. This gave us an elegant universal propertybased account of the BUILD and AUGMENT combinators, which form the coreof the shortcut defores ..."

Abstract
- Add to MetaCart

FOLD combinator. In an APLAS 2004 paper [1],we described an alternative equivalent semantics of inductive types as limits of algebra structure forgetting functors. This gave us an elegant universal propertybased account of the BUILD and AUGMENT combinators, which form the coreof the shortcut deforestation program transformation method by Gill et al. [2, 3]. Here we present further evidence for the flexibility of our approach by showingthat a useful AUGMENT-like combinator is definable for a far wider class of pa-rameterized inductive types than free monads, namely for all monads arising from a parameterized monad via an initial algebra construction. 1.1 INTRODUCTION The standard approach to programming with inductive types is based on the IN/FOLD (constructors/structural recursion) syntax derived directly from their ini-tial algebra semantics. This encourages a modular style of programming where

### Explicit Binds: Effortless Efficiency with and without Trees

"... Abstract. We demonstrate a simple and robust program transformation technique that can improve asymptotic time complexity of datamanipulating programs (e.g., produce a linear-time list reversal function from the obvious quadratic one). In the version of the present paper, it applies to monadic induc ..."

Abstract
- Add to MetaCart

Abstract. We demonstrate a simple and robust program transformation technique that can improve asymptotic time complexity of datamanipulating programs (e.g., produce a linear-time list reversal function from the obvious quadratic one). In the version of the present paper, it applies to monadic inductive datatypes and can be stated in two flavors, through a datatype representation, with an explicit (“frozen”) bind constructor and a special associated defining clause for the fold function, and in a functional form (generalized Church numerals), with a special definition of the bind function in terms of the build constructor. The technique explicates, systematizes, combines and scales a number of ideas known from the literature, achieving a new level of generality. 1

### Haskell Programming with Nested Types: A Principled Approach †

"... Abstract. Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured r ..."

Abstract
- Add to MetaCart

Abstract. Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the build combinator, and immediately consumed using the fold combinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines build combinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell. 1.