Skip to content

Instantly share code, notes, and snippets.

@UndergroundLabs
Created March 20, 2016 11:30
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 UndergroundLabs/23a0fc56710c0337025c to your computer and use it in GitHub Desktop.
Save UndergroundLabs/23a0fc56710c0337025c to your computer and use it in GitHub Desktop.
IF = function(cond) {
return function(thn) {
return function(els) {
return cond(thn)(els);
}
}
}
tru = function(thn) {
return function(els) {
return thn;
}
}
fls = function(thn) {
return function(els) {
return els;
}
}
console.log(IF(fls)(1)(0));
@UndergroundLabs
Copy link
Author

Run with: nodejs lambda.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment