Skip to content

Instantly share code, notes, and snippets.

@alexeyraspopov
Created April 28, 2014 10:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alexeyraspopov/11367587 to your computer and use it in GitHub Desktop.
demethodize = Function.prototype.bind.bind(Function.prototype.call);
slice = demethodize(Array.prototype.slice);
function limitTo(fn, limit){
return () => fn.apply(this, slice(arguments, 0, limit));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment