Skip to content

Instantly share code, notes, and snippets.

@neftaly
Last active December 5, 2021 14:24
Show Gist options
  • Select an option

  • Save neftaly/6e11268f1cd230094c81 to your computer and use it in GitHub Desktop.

Select an option

Save neftaly/6e11268f1cd230094c81 to your computer and use it in GitHub Desktop.
ES6 Compose
const compose = (...args) => initial => args.reduceRight(
(result, fn) => fn(result),
initial
);
@WaldoJeffers
Copy link
Copy Markdown

Hello, here's my version https://gist.github.com/WaldoJeffers/905e14d03f4283599bac753f73b7716b. Does it cover your use cases ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment