Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created July 10, 2019 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/e7d23fc461bd2613f548b54dd484d723 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/e7d23fc461bd2613f548b54dd484d723 to your computer and use it in GitHub Desktop.
const phrase = 'Welcome';
const result = R.pipe(
append(' to'),
append(' Functional Programming'),
append(' I hope you like'),
append(' pipelining!'),
removeTheLetter('i'),
makeLetterUpperCase('o'),
makeLetterUpperCase('a'),
makeLetterUpperCase('e'),
removeWordsWithLessThanFourLetters // partial function application
)(phrase);
console.log(result);
// prints: WElcOmE FunctOnAl PrOgrAmmng ppElnng!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment