We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
尾调用(Tail Call)是函数式编程的一个重要概念,用简单的一句话描述就是“在函数的最后一步调用函数”
function f(x){ let y=x+1; return g(y); }
尾调用优化"(Tail call optimization),即只保留内层函数的调用记录。如果所有函数都是尾调用,那么完全可以做到每次执行时,调用记录只有一项,这将大大节省内存。这就是"尾调用优化"的意义。 现在还没有支持尾调用优化的 JavaScript 引擎 http://www.ruanyifeng.com/blog/2015/04/tail-call.html
The text was updated successfully, but these errors were encountered:
No branches or pull requests
尾调用(Tail Call)是函数式编程的一个重要概念,用简单的一句话描述就是“在函数的最后一步调用函数”
尾调用优化"(Tail call optimization),即只保留内层函数的调用记录。如果所有函数都是尾调用,那么完全可以做到每次执行时,调用记录只有一项,这将大大节省内存。这就是"尾调用优化"的意义。
现在还没有支持尾调用优化的 JavaScript 引擎
http://www.ruanyifeng.com/blog/2015/04/tail-call.html
The text was updated successfully, but these errors were encountered: