Does JavaScript support partial function application?

后端 未结 4 707
盖世英雄少女心
盖世英雄少女心 2021-01-05 01:18

Reading through the Wikipedia article on First-Class functions, there is a nice table of language support for various aspects of functional programming: http://en.wikipedia.

4条回答
  •  醉梦人生
    2021-01-05 01:46

    As noted in the other answers, what you describe is currying; it is a form of partial application, as you identify.

    However, if what you want is just partial application, you can use underscore.js, which adds a lot functional programming utilities: http://documentcloud.github.com/underscore/

提交回复
热议问题