Last active
January 24, 2018 21:15
-
-
Save roberto/2d4d483c47c6ef414d206e62199f5474 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
const increment = (key, obj) => { | |
return { | |
...obj, | |
[key]: obj[key] + 1 | |
} | |
} |
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
const increment = (key, obj) => | |
({...obj, [key]: obj[key] + 1}) |
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
const increment = (key, obj) => | |
R.evolve({[key]: R.inc}, obj) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment