Results 1 
3 of
3
Recursion Schemes from Comonads
, 2001
"... . Within the setting of the categorical approach to programming with total functions, a \manyinone" recursion scheme is introduced that neatly unies a variety of recursion schemes looking as diverging generalizations of the basic recursion scheme of iteration. The scheme is doubly generic: in addi ..."
Abstract

Cited by 21 (4 self)
 Add to MetaCart
. Within the setting of the categorical approach to programming with total functions, a \manyinone" recursion scheme is introduced that neatly unies a variety of recursion schemes looking as diverging generalizations of the basic recursion scheme of iteration. The scheme is doubly generic: in addition to behaving uniformly with respect to a functor determining an inductive type, it is also uniform in a comonad and a distributive law which together determine a particular recursion scheme for this inductive type. By way of examples, it is shown to subsume iteration, a scheme subsuming primitive recursion, and a scheme subsuming courseofvalue iteration.
Comonadic Iteration (Abstract)
, 2000
"... this paper, we discuss generic recursion combinators, i.e., combinator codings of recursive function definition schemes working uniformly on any inductive source type of functions. Such combinators are polymorphic in a type constructor inducing an inductive type. Generic recursion schemes are numero ..."
Abstract
 Add to MetaCart
this paper, we discuss generic recursion combinators, i.e., combinator codings of recursive function definition schemes working uniformly on any inductive source type of functions. Such combinators are polymorphic in a type constructor inducing an inductive type. Generic recursion schemes are numerous. The most fundamental and easy to code by a combinator are (simple) iteration and primitiverecursion. Some other schemes that are more general in terms of direct expression power, e.g., the courseofvalue strengthenings of iteration and primitiverecursion, are equally useful in programming and do not lead to considerably higher sophistication in the formulation [1]. Too particular generalizations, however, get too esoteric and sophisticated. To make a library primitive out of every powerful imaginable recursion scheme is therefore not a good idea. It might be the case that a better approach is to add another dimension of genericity. In this paper, we suggest a "manyinone" recursion combinator that neatly captures a whole family of recursion schemes that prima facie present themselves as diverging generalizations of simple iteration. The combinator is doubly generic: in addition to being polymorphic in a signature for an inductive type, it is polymorphic in a comonad and a natural transformation, which together determine a particular recursion scheme. The family includes simple primitiverecursion, courseofvalue versions of iteration and primitiverecursion, and much more. Below is a brief mathematical summary. Let C be a category and F : C # C be a functor. An F algebra is a morphism # : F C #C, where C (its carrier) is an object of C
Comonadic Iteration
"... Within the setting of the categorical approach to programming with total functions, a "manyinone" recursion scheme is introduced that neatly unifies a variety of recursion schemes looking as diverging generalizations of the basic recursion scheme of iteration. The scheme is doubly generic: in addi ..."
Abstract
 Add to MetaCart
Within the setting of the categorical approach to programming with total functions, a "manyinone" recursion scheme is introduced that neatly unifies a variety of recursion schemes looking as diverging generalizations of the basic recursion scheme of iteration. The scheme is doubly generic: in addition to behaving uniformly with respect to a functor determining an inductive type, it is also uniform in a comonad and a distributive law which together determine a particular recursion scheme for this inductive type. By way of examples, it is shown to subsume iteration, a scheme subsuming primitive recursion, and a scheme subsuming courseofvalue iteration.