Created
April 3, 2016 13:11
-
-
Save jessy1092/663896f1c37eaeded697230a9750cc94 to your computer and use it in GitHub Desktop.
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
| function sum(a) { | |
| function f(b) { | |
| return sum(a + b); | |
| } | |
| f.toString = function() { return a }; | |
| return f; | |
| }; | |
| var add3 = sum(1)(2); | |
| var result = [1, 2, 3] | |
| .map(add3) | |
| .forEach(alert); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment