Data structures and program transformation
Science of Computer Programming
Algebra of programming
ICFP '97 Proceedings of the second ACM SIGPLAN international conference on Functional programming
The art of computer programming, volume 3: (2nd ed.) sorting and searching
The art of computer programming, volume 3: (2nd ed.) sorting and searching
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Initial Algebra Semantics and Continuous Algebras
Journal of the ACM (JACM)
Generic downwards accumulations
Science of Computer Programming - Special issue on mathematics of program construction
Introduction to Functional Programming
Introduction to Functional Programming
Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire
Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture
An Extensional Characterization of Lambda-Lifting and Lambda-Dropping
FLOPS '99 Proceedings of the 4th Fuji International Symposium on Functional and Logic Programming
Codifying Guarded Definitions with Recursive Schemes
TYPES '94 Selected papers from the International Workshop on Types for Proofs and Programs
Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming
Polymorphic Type Schemes and Recursive Definitions
Proceedings of the 6th Colloquium on International Symposium on Programming
Selected Papers from the Internaltional Seminar on Partial Evaluation
MPC '98 Proceedings of the Mathematics of Program Construction
A Typed Lambda Calculus with Categorical Type Constructors
Category Theory and Computer Science
Categorical Fixed Point Calculus
CTCS '95 Proceedings of the 6th International Conference on Category Theory and Computer Science
Recursion schemes from comonads
Nordic Journal of Computing
Simulating quantified class constraints
Haskell '03 Proceedings of the 2003 ACM SIGPLAN workshop on Haskell
Mathematical Structures in Computer Science
Perfect trees and bit-reversal permutations
Journal of Functional Programming
Generalizing generalized tries
Journal of Functional Programming
Algebra of Programming by Richard Bird and Oege de Moor, Prentice Hall, 1996 (dated 1997).
Journal of Functional Programming
Disciplined, efficient, generalised folds for nested datatypes
Formal Aspects of Computing
Two-level types and parameterized modules
Journal of Functional Programming
Substitution in non-wellfounded syntax with variable binding
Theoretical Computer Science - Selected papers of CMCS'03
Scrap your boilerplate with class: extensible generic functions
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Iteration and coiteration schemes for higher-order and nested datatypes
Theoretical Computer Science - Foundations of software science and computation structures
Stream fusion: from lists to streams to nothing at all
ICFP '07 Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
Foundations for structured programming with GADTs
Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Central European Functional Programming School
Complete and decidable type inference for GADTs
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Parametric datatype-genericity
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
Corecursive Algebras: A Study of General Structured Corecursion
Formal Methods: Foundations and Applications
Recursive coalgebras from comonads
Information and Computation - Special issue: Seventh workshop on coalgebraic methods in computer science 2004
Representations of first order function types as terminal coalgebras
TLCA'01 Proceedings of the 5th international conference on Typed lambda calculi and applications
Initial algebra semantics is enough!
TLCA'07 Proceedings of the 8th international conference on Typed lambda calculi and applications
Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
Factorising folds for faster functions
Journal of Functional Programming
AMAST'10 Proceedings of the 13th international conference on Algebraic methodology and software technology
Concrete stream calculus: An extended study
Journal of Functional Programming
Unifying structured recursion schemes
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
A short cut to parallelization theorems
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Histo- and dynamorphisms revisited
Proceedings of the 9th ACM SIGPLAN workshop on Generic programming
Hi-index | 0.00 |
Folds and unfolds are at the heart of the algebra of programming. They allow the cognoscenti to derive and manipulate programs rigorously and effectively. However, most, if not all, programs require some tweaking to be given the form of an (un)fold. In this article, we remedy the situation by introducing adjoint (un)folds. We demonstrate that most programs are already of the required form and thus are directly amenable to formal manipulation. Central to the development is the categorical notion of an adjunction, which links adjoint (un)folds to standard (un)folds. We discuss a multitude of basic adjunctions and ways of combining adjunctions and show that they are directly relevant to programming. Furthermore, we develop the calculational properties of adjoint (un)folds, providing several fusion laws, which codify basic optimisation principles. We give a novel proof of type fusion based on adjoint folds and discuss several applications-type fusion states conditions for fusing a left adjoint with an initial algebra to form another initial algebra. The formal development is complemented by a series of examples in Haskell.