Haskell solution to euler 4.