Order of Execution
In a recursive function, the position in which additional statements (i.e., statements other than the recursive call itself) are placed is important. In the simple case of a function calling itself only once, a statement placed before the recursive call will be executed first in the outermost stack frame, while a statement placed after the recursive call will be executed first in the innermost stack frame. Consider this example:
Read more about this topic: Recursion (computer Science)
Famous quotes containing the words order of, order and/or execution:
“An example is often a deceptive mirror, and the order of destiny, so troubling to our thoughts, is not always found written in things past.”
—Pierre Corneille (16061684)
“It is a monstrous thing that I will say, but I will say it all the same: I find in many things more restraint and order in my morals than in my opinions, and my lust less depraved than my reason.”
—Michel de Montaigne (15331592)
“The application requisite to the duties of the office I hold [governor of Virginia] is so excessive, and the execution of them after all so imperfect, that I have determined to retire from it at the close of the present campaign.”
—Thomas Jefferson (17431826)