Simplifying the factorial function implementation in haskell.