function zero(x) {
var num = 0;
return x ? x(num) : num;
}
function one(x) {
var num = 1;
return x ? x(num) : num;
}
function two(x) {
var num = 2;
return x ? x(num) : num;
}
function three(x) {
var num = 3;
return x ? x(num) : num;
}
function four(x) {
var num = 4;
return x ? x(num) : num;
}
function five(x) {
var num = 5;
return x ? x(num) : num;
}
function six(x) {
var num = 6;
return x ? x(num) : num;
}
function seven(x) {
var num = 7;
return x ? x(num) : num;
}
function eight(x) {
var num = 8;
return x ? x(num) : num;
}
function nine(x) {
var num = 9;
if (arguments.length > 0) {
return x(num);
}
return num;
}
function plus(a) {
return function (c) {
return a + c;
};
}
function minus(a) {
return function (c) {
return c - a;
};
}
function times(a) {
return function (c) {
return c * a;
};
}
function dividedBy(a) {
return function (c) {
return c / a;
};
}
console.log(five(plus(eight()))); // must return 13
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.