Merging Monads and Folds for Functional Programming

These notes discuss the simultaneous use of generalised fold operators and monads to structure functional programs. Generalised fold operators structure programs after the decomposition of the value they consume. Monads structure programs after the computation of the value they produce. Our programs abstract both from the recursive processing of their input as well as from the side-effects in computing their output. We show how generalised monadic folds aid in calculating an efficient graph reduction engine from an inefficient specification.

[1]  Maarten M. Fokkinga,et al.  Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire , 1991, FPCA.

[2]  Paul Burton Brown,et al.  Electronics for the modern scientist , 1982 .

[3]  E. G. Merrill Electronics for the Modern Scientist, Paul B. Brown, Gunter N. Franz, Howard Moraff (Eds.). Elsevier Science Publishing Company, New York (1982), (x + 496 pages) ISBN 0 444 00660 5 , 1984 .

[4]  Thomas Johnsson,et al.  Fold-Unfold Transformations on State Monadic Interpreters , 1994, Functional Programming.

[5]  Simon L. Peyton Jones,et al.  A short cut to deforestation , 1993, FPCA '93.

[6]  S. Doaitse Swierstra,et al.  Virtual Data Structures , 1993, Formal Program Development.

[7]  Graham Hutton,et al.  Bananas in space: extending fold and unfold to exponential types , 1995, FPCA '95.

[8]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[9]  G. Malcolm,et al.  Data Structures and Program Transformation , 1990, Sci. Comput. Program..

[10]  Akihiko Takano,et al.  Shortcut deforestation in calculational form , 1995, FPCA '95.

[11]  Peter J. Freyd,et al.  Recursive types reduced to inductive types , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[12]  Johan Jeuring,et al.  A translation from attribute grammars to catamorphisms , 1991 .

[13]  Johan Jeuring Algorithms for Theorems , 1990, Programming Concepts and Methods.

[14]  John Launchbury,et al.  Graph Algorithms with a Functional Flavous , 1995, Advanced Functional Programming.

[15]  Richard S. Bird,et al.  Lectures on Constructive Functional Programming , 1989 .

[16]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[17]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[18]  Philip Wadler Monads for Functional Programming , 1995, Advanced Functional Programming.

[19]  Lambert Meertens,et al.  A tribute to attributes , 1991 .

[20]  Maarten M. Fokkinga Monadic Maps and Folds for Arbitrary Datatypes , 1994 .

[21]  Richard B. Kieburtz,et al.  Programming with Algebras , 1995, Advanced Functional Programming.

[22]  Philip Wadler,et al.  Monads for functional programming , 1995, NATO ASI PDC.

[23]  Lambert Meertens,et al.  Algorithmics : towards programming as a mathematical activity , 1986 .

[24]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1990, Theor. Comput. Sci..

[25]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.