Skip to content

Instantly share code, notes, and snippets.

@venomnert
Created June 30, 2017 23:24
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 venomnert/532ca9c64a0c4ca0bca18ca4c2f50655 to your computer and use it in GitHub Desktop.
Save venomnert/532ca9c64a0c4ca0bca18ca4c2f50655 to your computer and use it in GitHub Desktop.
const _pipe = (a, b) => (arg) => b(a(arg));
// Refactored
const pipe = (...ops) => ops.reduce(_pipe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment