Haskell solution to euler8.