My first non-trivial Haskell program