Skip to content

Instantly share code, notes, and snippets.

@dtipson
Last active March 26, 2018 09:39
Show Gist options
  • Select an option

  • Save dtipson/2494035813f840d6e14f to your computer and use it in GitHub Desktop.

Select an option

Save dtipson/2494035813f840d6e14f to your computer and use it in GitHub Desktop.
Silly program example #2
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