q002 sol in haskell