Problem2: added haskell solution