Skip to content
For creating functional compositions
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
.jshintrc
.npmignore
LICENSE
README.md
index.js
package.json

README.md

komposit

For creating functional compositions.

komposit(functions...)

Creates a composite function out of supplied argument functions. komposite(f,g,h)(x) is equivalent to h(g(f(x)))

var add10 = function (n) { return n + 10; };
var divideBy2 = function (n) { return n / 2; };

divideBy2(add10(20)) // 15

var add10AndDivideBy2 = komposit(add10, divide2);

add10AndDivideBy2(20) // 15
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.