Skip to content

Instantly share code, notes, and snippets.

@bxt
Created February 4, 2015 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bxt/66e1aeaac8451bb00007 to your computer and use it in GitHub Desktop.
Save bxt/66e1aeaac8451bb00007 to your computer and use it in GitHub Desktop.
Higher order functions chain (compose) and accessor for JS, highly useful for d3.js
function acc(i) {
return function(d) {
return d[i];
}
}
function ch(a,b) {
return function(d) {
return a(b(d));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment