Created
October 17, 2016 07:03
-
-
Save yalovek/3a3f32f54df2c832462aceffa524fd6d to your computer and use it in GitHub Desktop.
Calculating sum of numbers sum(2)(3)(4)
This file contains 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(x) { | |
const f = y => sum(x + y); | |
f.valueOf = () => x; | |
return f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment