Last active
March 26, 2018 09:39
-
-
Save dtipson/2494035813f840d6e14f to your computer and use it in GitHub Desktop.
Silly program example #2
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
| getUserCommentsbyId = program( | |
| getUserbyIdAPI, // <-aysnc | |
| pick('commenterID'), // <-sync | |
| commentSearchAPI, // <-aysnc | |
| R.head, // <-sync | |
| R.tap(console.log.bind(console)) // <-sync, logs result to console | |
| ); | |
| // these each return a promise resolved with a user's latest comment based on a userID | |
| getUserCommentsbyId(345); | |
| getUserCommentsbyId(8); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment