Monday, 29 September 2014

Recursion

 - A method or function that calls itself.
 - A type of iteration or looping.
 - Must have a stopping condition (this prevents endless loops).

Two types:
 - Tail, when the last thing that happens is the recursive call.
 - Head, when the first thing that happens is the recursive call.

No comments:

Post a Comment