examples and exercises from Brian Marick's book, Functional Programming for the Object Oriented Programmer