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
什么是高阶函数?
The text was updated successfully, but these errors were encountered:
高阶函数就是参数为函数或者返回值为函数的函数。有了高阶函数,就可以将复用的粒度降低到函数级别,相对于面向对象语言,服复用的粒度更低。
高阶函数提供了一种函数级别上的依赖注入(或反转控制机制)。比如我们现在常用的Math.cell(),这就是实际应用中已经封装好的高阶函数。很多GOF设计模式都可以使用高阶函数实现,如Visitor,Strategy,Decorator等,如Visitor就可以用高阶函数中的map()或forEach()高阶函数来替代。
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: