Last active
December 3, 2017 15:43
-
-
Save MicroBenz/56bc508a880508bbab20f17565b0947b to your computer and use it in GitHub Desktop.
Recompose
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
const addBy = a => b => a + b; // addBy is function that take "a" as an argument and return a function b => a + b | |
const addByFive = addBy(5); // It will return b => 5 + b And it is a function! | |
const addByTen = addBy(10); // It will return b => 10 + b And it is a function! | |
addByFive(7); // 12 | |
addByTen(59); // 69 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment