Skip to content

Instantly share code, notes, and snippets.

@akhal3d96
Last active August 8, 2020 15:22
Show Gist options
  • Save akhal3d96/c0ecd73b64479fbd096970ce19253a37 to your computer and use it in GitHub Desktop.
Save akhal3d96/c0ecd73b64479fbd096970ce19253a37 to your computer and use it in GitHub Desktop.
pipe(fn1, fn2, f3)(data) == fn1(fn2(fn3(data)))
const pipe = (...fns) => x => fns.reduce((v, f) => f(v), x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment