This is a small live demonstration of the Haskell library circle-packing by Joachim Breitner:
Given a number of circles with their radii, this packags tries to arrange them tightly, without overlap and forming a large circle.
Finding the optimal solution is NP hard, so only heuristics are feasible. This particular implementation is neither very good nor very fast, compared to the state of the art in research. Nevertheless it is simple to use and gives visually acceptable results.
This particular demonstration uses the Haste compiler to generate JavaScript code from the original Haskell code and some code to address the HTML5 canvas, so although it runs in your browser, this is the Haskell code at work. There is an analougous demo based the Fay compiler and one using GHC-JS.