Many aspects of functions were explored in Chapter 4, including functions that call other functions. A closely related topic that was not considered at that time is whether or not a function can call itself. It turns out that this is, in fact, possible, and that it is a powerful technique for solving some problems.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Recursion

  • Ben Stephenson

摘要

Many aspects of functions were explored in Chapter 4, including functions that call other functions. A closely related topic that was not considered at that time is whether or not a function can call itself. It turns out that this is, in fact, possible, and that it is a powerful technique for solving some problems.