Skip to content

Instantly share code, notes, and snippets.

@kinsteronline
Created February 23, 2017 12:46
Show Gist options
  • Save kinsteronline/ea37a4ee44f6d6a73b15259a6c83c6f7 to your computer and use it in GitHub Desktop.
Save kinsteronline/ea37a4ee44f6d6a73b15259a6c83c6f7 to your computer and use it in GitHub Desktop.
Simple Addition
//
// 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