Created
April 20, 2019 07:03
-
-
Save MeetMartin/2c0353fc395f76045625f72caf2e530a to your computer and use it in GitHub Desktop.
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
| // 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