Skip to content

Instantly share code, notes, and snippets.

@MeetMartin
Created April 20, 2019 07:03
Show Gist options
  • Select an option

  • Save MeetMartin/2c0353fc395f76045625f72caf2e530a to your computer and use it in GitHub Desktop.

Select an option

Save MeetMartin/2c0353fc395f76045625f72caf2e530a to your computer and use it in GitHub Desktop.
// console.log is impure and does not provide any return value
// so we have to improve it
const investigate = a => console.log(a) || a;
const simonSays = composePipe(
investigate,
trim,
investigate,
partialSimonSays,
investigate
);
simonSays(' Jump! ');
// Jump!
// Jump!
// Simon Says: Jump!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment