Skip to content

Instantly share code, notes, and snippets.

@DanShappir
Created November 1, 2020 09:54
Show Gist options
  • Save DanShappir/80a2cfadbf17e1b756c29e1b075b0810 to your computer and use it in GitHub Desktop.
Save DanShappir/80a2cfadbf17e1b756c29e1b075b0810 to your computer and use it in GitHub Desktop.
Sequence of functions using pipeline operator
const result = 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