haskell solution to euler #21