add a Haskell solution