some stuff from taste of haskell