Skip to content

Instantly share code, notes, and snippets.

@schell
Last active December 16, 2015 00:59
Show Gist options
  • Save schell/5351428 to your computer and use it in GitHub Desktop.
Save schell/5351428 to your computer and use it in GitHub Desktop.
Function composition in javascript.
function compose(g, f) {
// Return our composure.
return function composedFuction() {
var args = Array.prototype.slice.call(arguments);
return f.call(null, g.apply(null, args));
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment