文件名称:functional-playground:函数式编程游乐场
文件大小:7KB
文件格式:ZIP
更新时间:2024-06-27 17:28:26
JavaScript
函数式编程游乐场 在 ES6 中玩弄函数式编程 撰写 组合 0->Infinity 函数 import compose from '../src/compose'; var square = x => x * x, half = x => x / 2, x2 = x => 2 * x, squareThenHalf = compose(square, half), doubleThenSquareThenHalf = compose(x2, square, half); squareThenHalf(10); // 50 doubleThenSquareThenHalf(3); // 18
【文件预览】:
functional-playground-master
----package.json(877B)
----test()
--------4-partial-application.js(4KB)
--------1-compose.js(1KB)
--------3-curry.js(1KB)
--------2-monad-debug.js(1KB)
----LICENSE(1KB)
----src()
--------debug-monad.js(702B)
--------compose.js(119B)
--------partial-application.js(590B)
--------curry.js(143B)
----.gitignore(526B)
----README.md(413B)
----.jshintrc(164B)