# Difference between revisions of "Research papers/Functional pearls"

From HaskellWiki

(added paper) |
(Updated several links) |
||

Line 1: | Line 1: | ||

− | Functional pearls are elegant, instructive examples of functional programming. They are supposed to be fun, and they teach important programming techniques and fundamental design principles. They traditionally appear in [http:// |
+ | Functional pearls are elegant, instructive examples of functional programming. They are supposed to be fun, and they teach important programming techniques and fundamental design principles. They traditionally appear in [http://journals.cambridge.org/action/displayJournal?jid=JFP The Journal of Functional Programming], and at [http://www.icfpconference.org/index.html ICFP] and affiliated workshops. |

The history of functional pearls is covered by: |
The history of functional pearls is covered by: |
||

Line 17: | Line 17: | ||

There have been some 64 functional pearls in JFP, and some others at |
There have been some 64 functional pearls in JFP, and some others at |
||

ICFP and the Haskell Workshop. There is also a collection of them in |
ICFP and the Haskell Workshop. There is also a collection of them in |
||

− | [http:// |
+ | [http://web2.comlab.ox.ac.uk/oucl/publications/books/fop/ The Fun of Programming]. |

The pearls tend to concentrate on: |
The pearls tend to concentrate on: |
||

Line 43: | Line 43: | ||

:Michael Adams. 2007. |
:Michael Adams. 2007. |
||

− | ;[http:// |
+ | ;[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.105.4086 A type-correct, stack-safe, provably correct expression compiler in Epigram] |

:James McKinna and Joel Wright. 2006. |
:James McKinna and Joel Wright. 2006. |
||

Line 49: | Line 49: | ||

:Conor McBride and Ross Paterson. 2006. |
:Conor McBride and Ross Paterson. 2006. |
||

− | ;[http://web.comlab.ox.ac.uk/ |
+ | ;[http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/publications/rationals.pdf Enumerating the rationals] |

:Jeremy Gibbons, David Lester and Richard Bird. 2006. |
:Jeremy Gibbons, David Lester and Richard Bird. 2006. |
||

Line 89: | Line 89: | ||

;[http://www.informatik.uni-bonn.de/~ralf/hw2001/2.ps.gz Inverting the Burrows Wheeler transform] |
;[http://www.informatik.uni-bonn.de/~ralf/hw2001/2.ps.gz Inverting the Burrows Wheeler transform] |
||

− | :Richard Bird and Shin-Cheng Mu. 2004. ([http://web.comlab.ox.ac.uk/ |
+ | :Richard Bird and Shin-Cheng Mu. 2004. ([http://web.comlab.ox.ac.uk/people/Richard.Bird/online/BirdMu2004Inverting.pdf Also here]). |

− | ;[http://web.comlab.ox.ac.uk/ |
+ | ;[http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/wg21/meeting56/loeh-paper.pdf Parsing permutation phrases] |

:Arthur Baars, Andres Loh and S. Doaitse Swierstra. 2004. |
:Arthur Baars, Andres Loh and S. Doaitse Swierstra. 2004. |
||

Line 110: | Line 110: | ||

;[http://www.informatik.uni-bonn.de/~ralf/hw2001/1.pdf Derivation of a logarithmic time carry lookahead addition circuit] |
;[http://www.informatik.uni-bonn.de/~ralf/hw2001/1.pdf Derivation of a logarithmic time carry lookahead addition circuit] |
||

− | :John O'Donnell and Gudula Runger. 2004. ([http://portal.acm.org/citation.cfm?coll=GUIDE&dl=GUIDE&id=1030343 ACM]) ([http://journals.cambridge.org |
+ | :John O'Donnell and Gudula Runger. 2004. ([http://portal.acm.org/citation.cfm?coll=GUIDE&dl=GUIDE&id=1030343 ACM]) ([http://journals.cambridge.org/action/displayAbstract?aid=254717 JFP]) ([http://www.informatik.uni-bonn.de/~ralf/hw2001/1.html Homepage]). |

;[http://www.lri.fr/~filliatr/ftp/publis/kr-fp.ps.gz Producing all ideals of a forest, functionally] |
;[http://www.lri.fr/~filliatr/ftp/publis/kr-fp.ps.gz Producing all ideals of a forest, functionally] |
||

Line 130: | Line 130: | ||

:Bryan Ford. 2002. |
:Bryan Ford. 2002. |
||

− | ;[http:// |
+ | ;[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.8.3014 Monads for Incremental Computing] |

:Magnus Carlsson. 2002. |
:Magnus Carlsson. 2002. |
||

Line 181: | Line 181: | ||

:Robert Harper. 1999. (see also [http://ropas.snu.ac.kr/~kwang/paper/06-jfp-yi.pdf Proof-directed debugging: revisited for a first-order version]). |
:Robert Harper. 1999. (see also [http://ropas.snu.ac.kr/~kwang/paper/06-jfp-yi.pdf Proof-directed debugging: revisited for a first-order version]). |
||

− | ;[http://web.comlab.ox.ac.uk/ |
+ | ;[http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/publications/radix.ps.gz A pointless derivation of radix sort] |

:Jeremy Gibbons. 1999. |
:Jeremy Gibbons. 1999. |
||

Line 187: | Line 187: | ||

:Graham Hutton and Erik Meijer . 1998. |
:Graham Hutton and Erik Meijer . 1998. |
||

− | ;[http:// |
+ | ;[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.49.6891 Polytypic unification] |

:Patrik Jansson and Johan Jeuring. 1998. |
:Patrik Jansson and Johan Jeuring. 1998. |
||

Line 196: | Line 196: | ||

:Chris Okasaki. 1998. |
:Chris Okasaki. 1998. |
||

− | ;[http://www.st.cs.uni- |
+ | ;[http://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf The Zipper] |

:Gerard Huet. 1997. (See also [http://en.wikibooks.org/wiki/Haskell/Zippers The Haskell Wikibook]). |
:Gerard Huet. 1997. (See also [http://en.wikibooks.org/wiki/Haskell/Zippers The Haskell Wikibook]). |
||

Line 205: | Line 205: | ||

:Chris Okasaki. 1997. |
:Chris Okasaki. 1997. |
||

− | ;[http://web.comlab.ox.ac.uk/ |
+ | ;[http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/publications/thirdht.ps.gz The Third Homomorphism Theorem] |

:Jeremy Gibbons. 1996. |
:Jeremy Gibbons. 1996. |
||

Line 214: | Line 214: | ||

:Andrew J. Kennedy. 1996. |
:Andrew J. Kennedy. 1996. |
||

− | ;[http://web.comlab.ox.ac.uk/ |
+ | ;[http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/publications/drawing.ps.gz Deriving Tidy Drawings of Trees] |

:Jeremy Gibbons. 1996. (See also [http://www.cs.auckland.ac.nz/CDMTCS//researchreports/003drawing.pdf the research report]). |
:Jeremy Gibbons. 1996. (See also [http://www.cs.auckland.ac.nz/CDMTCS//researchreports/003drawing.pdf the research report]). |
||

− | ;[http:// |
+ | ;[http://groups.csail.mit.edu/mac/users/adams/BB/ Efficient Sets - A Balancing Act] |

− | :Stephen Adams. 1993. ([http://haskell.org/ |
+ | :Stephen Adams. 1993. ([http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-Set.html Data.Set]). |

=== Potential Pearls === |
=== Potential Pearls === |
||

Line 241: | Line 241: | ||

;[http://journals.cambridge.org/article_S0956796804005210 Calculating the Sieve of Eratosthenes] |
;[http://journals.cambridge.org/article_S0956796804005210 Calculating the Sieve of Eratosthenes] |
||

− | :Lambert Meertens. Journal of Functional Programming, 14(6):759-763, 2004. ([http://web.comlab.ox.ac.uk/ |
+ | :Lambert Meertens. Journal of Functional Programming, 14(6):759-763, 2004. ([http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/wg21/meeting57/meertens-sieve.pdf slides]) |

;[http://www.cs.kent.ac.uk/pubs/2001/1293/index.html Red-black trees with types] |
;[http://www.cs.kent.ac.uk/pubs/2001/1293/index.html Red-black trees with types] |
||

Line 261: | Line 261: | ||

:Richard Bird. 2004. ([http://portal.acm.org/citation.cfm?id=1030333.1030336 ACM]) |
:Richard Bird. 2004. ([http://portal.acm.org/citation.cfm?id=1030333.1030336 ACM]) |
||

− | ;[http://journals.cambridge.org |
+ | ;[http://journals.cambridge.org/action/displayAbstract?fromPage=online&aid=44141 Meertens number] |

:Richard Bird. 1998. |
:Richard Bird. 1998. |
||

− | ;[http://journals.cambridge.org |
+ | ;[http://journals.cambridge.org/action/displayAbstract?aid=44091 On merging and selection] |

− | :Richard Bird. 1997. (See also [http://web.comlab.ox.ac.uk/ |
+ | :Richard Bird. 1997. (See also [http://web.comlab.ox.ac.uk/people/Jeremy.Gibbons/publications/merging.ps.gz More on Merging and Selection]). |

;[http://journals.cambridge.org/article_S0956796897002803 On building trees with minimum height] |
;[http://journals.cambridge.org/article_S0956796897002803 On building trees with minimum height] |
||

− | :Richard Bird. 1997. ([http://web.comlab.ox.ac.uk/ |
+ | :Richard Bird. 1997. ([http://web.comlab.ox.ac.uk/people/Richard.Bird/publications-bib.html#Bird97:OnBuilding Bib]). |

;The Last Tail. |
;The Last Tail. |

## Revision as of 20:31, 17 November 2008

Functional pearls are elegant, instructive examples of functional programming. They are supposed to be fun, and they teach important programming techniques and fundamental design principles. They traditionally appear in The Journal of Functional Programming, and at ICFP and affiliated workshops.

The history of functional pearls is covered by:

- How to Write a Functional Pearl
- Richard Bird. ICFP 2006.

- Fifteen years of functional pearls
- Richard Bird. ICFP 2006.

- Strachey's functional pearl, forty years on
- Mike Spivey, 2006.

- On Barron and Strachey's Cartesian Product Function
- Olivier Danvy and Michael Spivey, July 2007

There have been some 64 functional pearls in JFP, and some others at ICFP and the Haskell Workshop. There is also a collection of them in The Fun of Programming.

The pearls tend to concentrate on:

- Examples of program calculation and proof
- Neat presentations of new or old data structures
- Interesting applications and techniques

### Online

Functional pearls online:

- Bidirectionalization for Free!
- Janis Voigtländer. 2009.

- Much Ado about Two: A Pearl on Parallel Prefix Computation
- Janis Voigtländer. 2008.

- Clowns to the Left of me, Jokers to the Right: Dissecting Data Structures
- Conor McBride. 2008.

- Functional Pearl: The Great Escape: Or how to jump the border without getting caught
- David Herman. 2007.

- Scrap Your Zippers
- Michael Adams. 2007.

- A type-correct, stack-safe, provably correct expression compiler in Epigram
- James McKinna and Joel Wright. 2006.

- Applicative Programming with Effects
- Conor McBride and Ross Paterson. 2006.

- Enumerating the rationals
- Jeremy Gibbons, David Lester and Richard Bird. 2006.

- Probabilistic functional programming in Haskell
- Martin Erwig and Steve Kollmansberger. 2006.

- Marble mingling
- Sharon Curtis. 2006.

- Strong Types for Relational Databases
- Alexandra Silva, Joost Visser. 2006. (Haskell Workshop)

- Backtracking, interleaving, and terminating monad transformers
- Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, Amr Sabry. 2005.

- Scrap your Nameplate
- James Cheney. 2005.

- Pickler Combinators
- Andrew Kennedy. 2004.

- Composing fractals
- Mark P. Jones. 2004.

- Enumerating the strings of regular languages
- M. Douglas McIlroy. 2004.

- Functional satisfaction
- Luc Maranget. 2004. (More info).

- Implicit configurations--or, type classes reflect the values of types
- Oleg Kiselyov, Chung-chieh Shan. 2004. (also here)

- Global variables in Haskell
- John Hughes. 2004. (JFP)

- I am not a number -- I am a free variable
- Conor McBride, James McKinna. 2004.

- Inverting the Burrows Wheeler transform
- Richard Bird and Shin-Cheng Mu. 2004. (Also here).

- Parsing permutation phrases
- Arthur Baars, Andres Loh and S. Doaitse Swierstra. 2004.

- Concurrent distinct choices
- Sergio Antoy and Michael Hanus. 2004.

- Functional chart parsing of context-free grammars
- Peter Ljunglf. 2004.

- Type-Safe Cast
- Stephanie Weirich. 2004.

- Pickler Combinators
- Andrew J. Kennedy. 2004.

- Parallel Parsing Processes
- Koen Claessen. 2004.

- Derivation of a logarithmic time carry lookahead addition circuit
- John O'Donnell and Gudula Runger. 2004. (ACM) (JFP) (Homepage).

- Producing all ideals of a forest, functionally
- Jean-Christophe Fillitre and Franois Pottier. 2003.

- Trouble shared is trouble halved
- Richard Bird, Ralf Hinze. 2003

- Formatting: a class act
- Ralf Hinze. 2003.

- A fresh look at binary search trees
- Ralf Hinze. 2002.

- The countdown problem
- Graham Hutton. 2002.

- Packrat parsing: simple, powerful, lazy, linear time, functional pearl
- Bryan Ford. 2002.

- Monads for Incremental Computing
- Magnus Carlsson. 2002.

- Unfolding pointer algorithms
- Richard Bird. 2001.

- Maximum marking problems
- Richard Bird. 2001.

- Weaving a web
- Ralf Hinze and Johan Jeuring. 2001.

- Normalization by evaluation with typed abstract syntax
- Olivier Danvy, Morten Rhiger and Kristoffer H. Rose. 2001.

- Do we need dependent types?
- Daniel Fridlender and Mia Indrika. 2001.

- Perfect trees and bit-reversal permutations
- Ralf Hinze. 2000.

- Combinators for breadth-first search
- Michael Spivey. 2000

- Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design
- Chris Okasaki. 2000.

- Deriving Backtracking Monad Transformers
- Ralf Hinze. 2000.

- Recursive subtyping revealed
- Vladimir Gapeyev, Michael Y. Levin, Benjamin C. Pierce. 2000.

- Composing contracts: an adventure in financial engineering
- Simon Peyton Jones, Jean-Marc Eber, Julian Seward. 2000.

- A poor man's concurrency monad
- Koen Claessen. 1999.

- Explaining binomial heaps
- Ralf Hinze. 1999.

- Power series, power serious
- M. Douglas McIlroy. 1999.

- Red-black trees in a functional setting
- Chris Okasaki. 1999.

- Proof-directed debugging
- Robert Harper. 1999. (see also Proof-directed debugging: revisited for a first-order version).

- A pointless derivation of radix sort
- Jeremy Gibbons. 1999.

- Monadic parsing in Haskell
- Graham Hutton and Erik Meijer . 1998.

- Polytypic unification
- Patrik Jansson and Johan Jeuring. 1998.

- Diets for fat sets
- Martin Erwig. 1998.

- Even higher-order functions for parsing or Why would anyone ever want to use a sixth-order function?
- Chris Okasaki. 1998.

- The Zipper
- Gerard Huet. 1997. (See also The Haskell Wikibook).

- Lazy wheel sieves and spirals of primes
- Colin Runciman. 1997.

- Three algorithms on Braun trees
- Chris Okasaki. 1997.

- The Third Homomorphism Theorem
- Jeremy Gibbons. 1996.

- Back to Basics: Deriving Representation Changers Functionally.
- Graham Hutton, Erik Meijer. 1996.

- Drawing Trees
- Andrew J. Kennedy. 1996.

- Deriving Tidy Drawings of Trees
- Jeremy Gibbons. 1996. (See also the research report).

- Efficient Sets - A Balancing Act
- Stephen Adams. 1993. (Data.Set).

### Potential Pearls

Unpublished pearls.

- Typed Quote/AntiQuote
- Ralf Hinze. Unpublished work in progress.

- α-conversion is easy
- Thorsten Altenkirch. Unpublished draft.

### Offline

These appear not to be available online, unfortunately. If you know where they live, please link, and move into the 'online' section!

- Functional Pearl: Streams and Unique Fixed Points
- Ralf Hinze, ICFP 2008

- Linear lambda calculus and PTIME-completeness
- Harry G. Mairson. 2004.

- Calculating the Sieve of Eratosthenes
- Lambert Meertens. Journal of Functional Programming, 14(6):759-763, 2004. (slides)

- Red-black trees with types
- Stefan Kahrs. 2001. (JFP) (Code!)

- On generating unique names
- Lennart Augustsson, M Rittri, D Synek. 1994. (Rittri's homepage)

- A Symmetric Set of Efficient List Operations.
- Rob R. Hoogerwoord, 1992. (Hoogerwoord's homepage).

- Finding celebrities: A lesson in functional programming
- Richard Bird and Sharon Curtis. 2006. (See also).

- A program to solve Sudoku
- Richard Bird. 2006. (slides appear here).

- On tiling a chessboard
- Richard Bird. 2004. (ACM)

- Meertens number
- Richard Bird. 1998.

- On merging and selection
- Richard Bird. 1997. (See also More on Merging and Selection).

- On building trees with minimum height
- Richard Bird. 1997. (Bib).

- The Last Tail.
- Richard Bird. 1993. (Bib).

- Two Greedy Algorithms
- Richard Bird, 1992. (Bib).

- On Removing Duplicates
- Richard Bird. 1991. (Bib).