Results 1 
6 of
6
Calculate Polytypically!
 In PLILP'96, volume 1140 of LNCS
, 1996
"... A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds another leve ..."
Abstract

Cited by 41 (3 self)
 Add to MetaCart
A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds another level of flexibility in the reusability of programming idioms and in the design of libraries of interoperable components.
Monadic Maps and Folds for Arbitrary Datatypes
 Memoranda Informatica, University of Twente
, 1994
"... Each datatype constructor comes equiped not only with a socalled map and fold (catamorphism), as is widely known, but, under some condition, also with a kind of map and fold that are related to an arbitrary given monad. This result follows from the preservation of initiality under lifting from the ..."
Abstract

Cited by 19 (0 self)
 Add to MetaCart
Each datatype constructor comes equiped not only with a socalled map and fold (catamorphism), as is widely known, but, under some condition, also with a kind of map and fold that are related to an arbitrary given monad. This result follows from the preservation of initiality under lifting from the category of algebras in a given category to a certain other category of algebras in the Kleisli category related to the monad.
Generic Downwards Accumulations
 Science of Computer Programming
, 2000
"... . A downwards accumulation is a higherorder operation that distributes information downwards through a data structure, from the root towards the leaves. The concept was originally introduced in an ad hoc way for just a couple of kinds of tree. We generalize the concept to an arbitrary regular d ..."
Abstract

Cited by 19 (3 self)
 Add to MetaCart
. A downwards accumulation is a higherorder operation that distributes information downwards through a data structure, from the root towards the leaves. The concept was originally introduced in an ad hoc way for just a couple of kinds of tree. We generalize the concept to an arbitrary regular datatype; the resulting denition is coinductive. 1 Introduction The notion of scans or accumulations on lists is well known, and has proved very fruitful for expressing and calculating with programs involving lists [4]. Gibbons [7, 8] generalizes the notion of accumulation to various kinds of tree; that generalization too has proved fruitful, underlying the derivations of a number of tree algorithms, such as the parallel prex algorithm for prex sums [15, 8], Reingold and Tilford's algorithm for drawing trees tidily [21, 9], and algorithms for query evaluation in structured text [16, 23]. There are two varieties of accumulation on lists: leftwards and rightwards. Leftwards accumulation ...
The Calculation of a Polytypic Parser
, 1996
"... In this paper it is shown how inverses can be used to calculate a parser. A polytypic unparser is given and by using rules for calculating inverses a polytypic parser is calculated from it. It can be instantiated automatically for all data types that can be described by a regular functor. The idea t ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
In this paper it is shown how inverses can be used to calculate a parser. A polytypic unparser is given and by using rules for calculating inverses a polytypic parser is calculated from it. It can be instantiated automatically for all data types that can be described by a regular functor. The idea that a parser can be calculated as the inverse of an unparser is not new, but because polytypical functions are used here the calculated parser is very general. Inverses are defined in a general way and rules are given to calculate them. The set monad has a strong connection with inverses and for many monadic concepts the instantiation with this monad gives rise to rules about inverses. In this way the inverses of catamorphisms and anamorphisms can be characterized. As we know that the unparser and the rules that were used in the calculation are correct, the calculated parser is known to be correct too. In general the parser that results from such a calculation is not very efficient and it is possible to construct much more efficient parsers by hand. Because it is possible to prove the equality of these two parsers, this parser is correct too. An implementation of parsers for a small subset of html and latex is given as an illustration of how the polytypic functions are instantiated for a particular datatype. Contents 1
A Database Calculus Based on Strong Monads and Partial Functions
"... This paper sketches an approach to calculi for databases which provide multiple data types. The setup has a categorical flavour, but no more than some intuitive understanding of a few basic concepts of category theory is expected of the reader. The first layer of the calculus consists of operations ..."
Abstract
 Add to MetaCart
This paper sketches an approach to calculi for databases which provide multiple data types. The setup has a categorical flavour, but no more than some intuitive understanding of a few basic concepts of category theory is expected of the reader. The first layer of the calculus consists of operations on basic values that correspond to the traditional tuples of relational databases. These operations are provided by a category with special (viz. associative and semicommutative) products. The labels of the tuples are provided by the categorical typing. In the second layer, these operations are lifted to operations on sets, resulting in the traditional relational algebra operators. The collection of operators that allows us to do that turns out to represent an algebra with sets as "firstclass citizens", the nested relational algebra. The resulting algebra is, if we abstract from sets, one of strong monads with some additional requirements. The final section discusses the possibilities of combining and interfacing several such monads. 2 Special products
StateBased Functional Programming
, 1993
"... F5.998> ; binds weakest of all operations. 2 Monads. As a preliminary we recall here the notion and use of monads. This is my own view of monads, not the view expressed by Sheard. Let F be a functor. Suppose we wish to compose functions of type a # F b , for varying types a and b . Let us call suc ..."
Abstract
 Add to MetaCart
F5.998> ; binds weakest of all operations. 2 Monads. As a preliminary we recall here the notion and use of monads. This is my own view of monads, not the view expressed by Sheard. Let F be a functor. Suppose we wish to compose functions of type a # F b , for varying types a and b . Let us call such functions F resultric. The obvious way to do so, is to define the desired ` F composition' ; F by: f ; F g = f ; Fg ; , 1 where : FF . # F is supposed to exist. This is the obvious definition, since it meets the typing requirement: f : a # F b, g: b # F c<F20.7