Created
November 1, 2020 09:56
-
-
Save DanShappir/8420395207b77bd4ee73ccdcb33ffd0e to your computer and use it in GitHub Desktop.
Using the pipe() function to invoke a sequence of functions
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
const result = pipe( | |
numbers, | |
filter(v => v % 2 == 0), | |
map(v => v + 1), | |
slice(0, 3), | |
Array.from | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment