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: Recursive Call
Famous quotes containing the words order and/or execution:
“In our science and philosophy, even, there is commonly no true and absolute account of things. The spirit of sect and bigotry has planted its hoof amid the stars. You have only to discuss the problem, whether the stars are inhabited or not, in order to discover it.”
—Henry David Thoreau (18171862)
“If Germany is to become a colonising power, all I say is, God speed her! She becomes our ally and partner in the execution of the great purposes of Providence for the advantage of mankind.”
—W.E. (William Ewart)