Skip to content

Instantly share code, notes, and snippets.

@kirpalmakanga
Last active August 22, 2018 08:16
Show Gist options
  • Save kirpalmakanga/f8fe442b18c940f1089254fd3b56309b to your computer and use it in GitHub Desktop.
Save kirpalmakanga/f8fe442b18c940f1089254fd3b56309b to your computer and use it in GitHub Desktop.
Pipe function (sync)
const pipe = (...ops) => ops.reduce(
(a, b) => (...arg) => b(a(...arg))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment