Added the recursive factorial implementation.