Created
June 30, 2016 02:21
-
-
Save nitriques/70ae612b491b57a144eebc60a39046cd to your computer and use it in GitHub Desktop.
recursive curried adder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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