Skip to content

Instantly share code, notes, and snippets.

@nitriques
Created June 30, 2016 02:21
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 nitriques/70ae612b491b57a144eebc60a39046cd to your computer and use it in GitHub Desktop.
Save nitriques/70ae612b491b57a144eebc60a39046cd to your computer and use it in GitHub Desktop.
recursive curried adder
'use strict';
var add = function (x) {
var i = function (y) { return add(x + y); };
i.valueOf = function () { return Number(x); };
return i;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment