Under the articles section (see links to the left or just follow this), I've posted a simulator for the Relational Algebra of database theory, written in Haskell. It's 708 lines long, including comments, a textbook-sample database, and a comprehensive regression test. It's a shocking 259 lines long with those non-essentials removed. To execute it, get a copy of Hugs98 from www.haskell.org, load the file and type "main". That will run the regression test. Have fun.