Skip to content

Instantly share code, notes, and snippets.

@KOBA789
Created November 23, 2011 10:32
Show Gist options
  • Select an option

  • Save KOBA789/1388359 to your computer and use it in GitHub Desktop.

Select an option

Save KOBA789/1388359 to your computer and use it in GitHub Desktop.
JavaScript で関数を合成してみた
function compose () {
return Array.prototype.reduce.call(arguments, function (f, g) {
return function (x) {
return f(g(x));
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment