Last active
May 23, 2017 13:25
-
-
Save ncuillery/b0f801a57d477c358aecbb5dc29efb6d to your computer and use it in GitHub Desktop.
ReactEurope2017_3
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 names = compose( | |
map(person => person.name), | |
sortBy(person => person.age), | |
filter(person => person.age < 30) | |
)(persons); | |
// In opposite to lodash/fp/compose, lodash/fp/pipe preserves the chain order: | |
const names = pipe( | |
filter(person => person.age < 30), | |
sortBy(person => person.age), | |
map(person => person.name) | |
)(persons); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment