Recursion is when a method calls itself. So far so good, but I need a better vocabulary for discussing the details of recursion. There probably is one. Could you help me learn?
E.g. when a method has been called recursivly a few times there will be several - eh- instances(?) of that method active? Or what would you call such an instance? An invocation?
Let's say for now invocation is the
word. Say I am talking about a specific invocation and want to talk about the invocation that called this one, or the invocation this one called. How do I refer to these other invocations relative to this one? Parent and child? Higher or lower level? Prior or following? Time for an example:
Say myFactorial is first invoked with the parameter 5. The next invocation will be 4, the following 3 and so on. So, relative to the invocation that has 3 as a parameter, how do you refer to the invocations with 2 and 4 as parameters respectivly? (of course, not all examples of recursion are as straight forward as this).