Skip to content

Instantly share code, notes, and snippets.

@tylshe
Last active December 30, 2015 04:49
Show Gist options
  • Save tylshe/7778777 to your computer and use it in GitHub Desktop.
Save tylshe/7778777 to your computer and use it in GitHub Desktop.
function sum(a,b){
return a+b;
}
function F(f, a){
var c = f.bind(null, a);
F = function(f, b){
return c(b)
}
}
F(sum, 1)
alert(F(sum, 4)) // 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment