Week #10--Recursion - Chapter 14
We have already seen examples of Functions and Procedures that reference other Functions and Procedures.
If a Function or Procedure references itself (possibly indirectly) it is RECURSIVE.
EXAMPLES
- n! where 1 if n = 0
n! =
1 x 2 x 3 x . . . x n if n > 0
OR 1 if n = 0
n! =
n x ( n - 1 ) ! if n > 0