q001 sol in haskell