Scratch work from reading Real World Haskell