Example
The factorial of n (written n!) is defined as
0! = 1
n! = n(n-1)(n-2)...2*1
For example
3! = 3*2*1 = 6
6! = 6*5*4*3*2*1 = 720
Let us define the factorial function as
Notice that factorial function can be written "in terms of itself" since,
factorial(n) = n!
= n(n-1)(n-2)...2*1
= n * (n-1)!
= n * factorial(n-1)