Prime factorization in Haskell.