real world haskell - code from the book