Created
February 23, 2017 12:46
-
-
Save kinsteronline/ea37a4ee44f6d6a73b15259a6c83c6f7 to your computer and use it in GitHub Desktop.
Simple Addition
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
// | |
// it all adds up *whomp whomp* | |
// | |
const add = function (a, b) { | |
return a + b | |
} | |
const add10 = x => add(10, x) | |
const add100 = add.bind(null, 100) | |
const addition = (a) => (b) => a + b | |
const result = (addition)(15)(5) | |
const additionalOneThousand = addition(1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment