From HaskellWiki

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.

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

There have been many 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

Some advice on writing pearls for JFP is available in this editorial.

Online

Functional pearls online:

What You Needa Know about Yoneda: Profunctor Optics and the Yoneda Lemma Guillaume Boisseau, Jeremy Gibbons. 2018.

Algebraic Graphs with Class Andrey Mokhov. 2017.

Ode on a Random Urn Leonidas Lampropoulos, Antal Spector-Zabusky, Kenneth Foner. 2017.

Deriving a Probability Density Calculator Wazim Mohammed Ismail, Chung-chieh Shan. 2016.

Free Delivery Jeremy Gibbons. 2016.

All Sorts of Permutations Jan Christiansen, Nikita Danilenko, Sandra Dylus. 2016.

A Smart View on Datatypes Mauro Jaskelioff, Exequiel Rivas. 2015.

Solving the Snake Cube Puzzle in Haskell Mark P. Jones. 2013.

When Maybe is not good enough Michael Spivey. 2012.

The Hough transform Maarten Fokkinga. 2011.

Every Bit Counts Dimitrios Vytiniotis, Andrew Kennedy. 2010.

A Play on Regular Expressions Sebastian Fischer. Frank Huch, Thomas Wilke. 2010.

Free Theorems Involving Type Constructor Classes Janis Voigtländer. 2009.

A Domain-Specific Language for Experimental Game Theory Eric Walkingshaw and Martin Erwig. 2009.

Functional Pearl: Data Types A La Carte Wouter Swierstra, 2008

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

Generic Discrimination: Sorting and Partitioning Unshared Data in Linear Time Fritz Henglein. 2008

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.

A program to solve Sudoku Richard Bird. 2006. (slides appear here, a Literate Haskell implementation by Graham Hutton based on this can be found here).

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.

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

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

Concurrent distinct choices Sergio Antoy and Michael Hanus. 2004.

Parallel Parsing Processes Koen Claessen. 2004.

Producing all ideals of a forest, functionally Jean-Christophe Filliatre and Francois Pottier. 2003.

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

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

The countdown problem Graham Hutton. 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.

Combinators for breadth-first search Michael Spivey. 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.

Explaining binomial heaps Ralf Hinze. 1999.

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.

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.

Undoing Dynamic Typing Nick Benton. 2008.

Potential Pearls

Unpublished pearls.

α-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!

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.

Meertens number Richard Bird. 1998.

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

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