Skip to content

Instantly share code, notes, and snippets.

@DanShappir
Created November 1, 2020 09:56
Show Gist options
  • Save DanShappir/8420395207b77bd4ee73ccdcb33ffd0e to your computer and use it in GitHub Desktop.
Save DanShappir/8420395207b77bd4ee73ccdcb33ffd0e to your computer and use it in GitHub Desktop.
Using the pipe() function to invoke a sequence of functions
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