adds some work from Beginning Haskell