Skip to content

Instantly share code, notes, and snippets.

@jasdeepkhalsa
Forked from ericelliott/compose.js
Created July 24, 2020 16:16
Show Gist options
  • Save jasdeepkhalsa/4fc80b0de3eabd8d58c416e785d14327 to your computer and use it in GitHub Desktop.
Save jasdeepkhalsa/4fc80b0de3eabd8d58c416e785d14327 to your computer and use it in GitHub Desktop.
Compose implementation
const compose = (...fns) => x => fns.reduceRight((v, f) => f(v), x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment