Anonymous recursion: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (oops) |
||
Line 1: | Line 1: | ||
{{task|Recursion}} |
{{task|Recursion}} |
||
While implementing a recursive function, it often happens that we must resort to a separate ''helper function'' to handle the actual recursion. |
While implementing a recursive function, it often happens that we must resort to a separate ''helper function'' to handle the actual recursion. |
||
This is usually the case when directly calling the current function would waste too many resources (stack space, execution time), causing unwanted side-effects, and/or the function doesn't have the right arguments and/or return values. |
This is usually the case when directly calling the current function would waste too many resources (stack space, execution time), causing unwanted side-effects, and/or the function doesn't have the right arguments and/or return values. |