Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire

@inproceedings{Meijer1991FunctionalPW,
  title={Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire},
  author={Erik Meijer and Maarten M. Fokkinga and Ross A. Paterson},
  booktitle={FPCA},
  year={1991}
}
We develop a calculus for lazy functional programming based on recursion operators associated with data type definitions. For these operators we derive various algebraic laws that are useful in deriving and manipulating programs. We shall show that all example functions in Bird and Wadler's Introduction to Functional Programming can be expressed using these operators. 
Sliced bananas on opaque data ? The expression lemma
Algebraic data types and catamorphisms (folds) play a central role in functional programming as they allow programmers to define recursive data structures and operations on them uniformly byExpand
FUNCTIONAL PROGRAMMING WITH APOMORPHISMS (CORECURSION)
TLDR
This work draws attention to the dual notion of apomorphisms — functions with coinductive target types defined by primitive corecursion and shows on examples that primitivecorecursion is useful in programming. Expand
The Expression Lemma
TLDR
A coalgebraic model of OO programming with functional objects is assumed and the development may be helpful in deriving refactorings that turn sufficiently disciplined functional programs into OO programs of a designated shape and vice versa. Expand
Down with variables
TLDR
This paper presents a mechanism that allows programmers to convert classic point-wise code into point-free style, and a Haskell library that enables the direct execution of the resulting code. Expand
Polytipic recursion patterns
Recursive schemes over inductive data structures have been recognized as categorytheoretic universals, yielding a handful of equational laws for program construction and transformation. This paperExpand
Handling Recursion in Generic Programming Using Closed Type Families
Many of the extensively used libraries for datatype-generic programming offer a fixed-point view on datatypes to express their recursive structure. However, some other approaches, especially the onesExpand
Chapter 25 Reasoning About Effects : Seeing the Wood Through the Trees
Pure functional languages support programming with impure effects by exploiting mathematical notions such as monads, applicative functors, and arrows. However, in contrast to the wealth of researchExpand
Polytypic Recursion Patterns
Recursive schemes over inductive data structures have been recognized as categorytheoretic universals, yielding a handful of equational laws for program construction and transformation. This paperExpand
Polytypic Recursion
Recursive schemes over inductive data structures have been recognized as category-theoretic universals, yielding a handful of equational laws for program construction and transformation. This paperExpand
Shortcut deforestation in calculational form
TLDR
This work presents a simple algorithm for deforestation based on two fusion rules for hylomorphismj an expressive recursion pattern, and a generic notation for hyLomorphisms is introduced, where natural transformations are explicitly factored out, and it is used to represent programs. Expand
...
1
2
3
4
5
...

References

SHOWING 1-10 OF 52 REFERENCES
Introduction to functional programming
  • R. Bird, P. Wadler
  • Computer Science
  • Prentice Hall International series in computer science
  • 1988
TLDR
This is a thorough introduction to the fundamental concepts of functional programming that includes a simple, yet coherent treatment of the Haskell class; a calculus of time complexity; and new coverage of monadic input-output. Expand
An introduction to the theory of lists
TLDR
In these lectures a notation and a calculus for specifying and manipulating computable functions over lists are introduced, used to derive efficient solutions for a number of problems, including problems in text processing. Expand
Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory
TLDR
Treats various kinds of languages, beginning with the pure-lambda-calculus and progressing through languages with states, commands, jumps, and assignments. Expand
Comprehending monads
  • P. Wadler
  • Computer Science
  • LISP and Functional Programming
  • 1990
TLDR
It is shown how list comprehensions may be generalised to an arbitrary monad, and how the resulting programming feature can concisely express in a pure functional language some programs that manipulate state, handle exceptions, parse text, or invoke continuations. Expand
Retractions in comparing Prolog semantics
TLDR
An operational model O and a continuation based denotational model D for a uniform variant of PROLOG, including the cut operator are proved equivalent in a novel way by comparing yet another pair of higher order transformations Phi~ and Psi~, that yield Phi and PSI, respectively, by application of a suitable abstraction operator. Expand
Theorems for free!
TLDR
From the type of a polymorphic function the authors can derive a theorem that it satisfies, courtesy of Reynolds’ abstraction theorem for the polymorphic lambda calculus, which provides a free source of useful theorems. Expand
Codatatypes in ML
  • T. Hagino
  • Computer Science, Mathematics
  • J. Symb. Comput.
  • 1989
TLDR
A new data type declaration mechanism of defining codatatypes is introduced to a functional programming language ML, giving ML the missing half of data types and makes ML symmetric. Expand
Some Techniques for Recursion Removal from Recursive Functions
TLDR
This method uses generalization to transform a recursive definition into an equivalent tail-recursive one in a systematic way which can be automated, and proves the validity of the recursive-to-iterative transformation, even when the recursive definition is not everywhere defined. Expand
Program Calculation Properties of Continuous Algebras
Defining data types as initial algebras, or dually as final co-algebras, is beneficial, if not indispensible, for an algebraic calculus for program construction, in view of the nice equationalExpand
Algorithmics : towards programming as a mathematical activity
TLDR
The essence of the method is to start with an obviously correct—but possibly hopelessly inefficient—algorithm, and to improve by successively applying correctness-preserving transformations, akin to those used in mathematics. Expand
...
1
2
3
4
5
...