Functional 是一个用于 JavaScript 中函数式编程的库。它定义了标准的高阶函数,如 map、reduce(又名 foldl)和 select(又名 filter)。
Functional 是一个用于 JavaScript 中函数式编程的库。它定义了标准的高阶函数,如 map、reduce(又名 foldl)和 select(又名 filter)。
This code, from 2007, is deprecated. I'm keeping it available for historical interest.
Some of the ideas in this code and in its companion collections.js were used in Jeremy Ashkenas's Underscore.js, which in turn inspired Lodash. Use those instead.
CoffeeScript (aso by Jeremy Ashkenas) and ECMAScript 6 also include arrow functions and functional programming functions such as map. If you use these languages, or many other modern languages that compile into ECMAScript, you can do functional prorammming entirely within the language.
Thanks to everyone who has contributed, and to everyone who has thanked me over the years, thank you in turn.
Functional defines higher-order methods and functions for functional
and function-level programming. It also defines "string lambdas",
that allow strings such as x+1 and x -> x+1 to be used in some
contexts as functions.
It is licensed under the MIT License.
For more details, see http://osteele.com/sources/javascript/functional/.
Array.slice suggestionFunction.lambda memoization暂无开放 Issues,或尚未同步最近议题。