Add an implementation of the factorial algorithm in Haskell.