Able to write factorial function.