Skip to content

Instantly share code, notes, and snippets.

@naholyr
Created November 17, 2013 12:03
Show Gist options
  • Save naholyr/7512498 to your computer and use it in GitHub Desktop.
Save naholyr/7512498 to your computer and use it in GitHub Desktop.
// I care about context
foo = obj.bar.bind(obj).partial(1, 2)
foo = obj.bar.bind(obj, 1, 2)
// I don't care about context
foo = bar.partial(1, 2)
foo = bar.bind(null, 1, 2)
// In one case, bind() wins obviously
// In the other case, partial() wins hardly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment