Skip to content

Instantly share code, notes, and snippets.

@thebigbad
Created January 20, 2011 02:06
Show Gist options
  • Select an option

  • Save thebigbad/787281 to your computer and use it in GitHub Desktop.

Select an option

Save thebigbad/787281 to your computer and use it in GitHub Desktop.
var foo = function (bar, baz) {};
var getBaz = function (callback) {
var baz = 3;
callback(baz);
};
var bar = 2;
getBaz(function (baz) { foo(bar, baz); });
/* BLARG BLARG BLARG */
var foo = function (bar, baz) {};
var getBaz = function (callback) {
var baz = 3;
callback(baz);
};
var bar = 2;
var curry = function (f, first_arg) {
return function (second_arg) {
f(first_arg, second_arg);
};
};
getBaz(curry(foo, bar));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment