Skip to content

Instantly share code, notes, and snippets.

@dmitryshelomanov
Last active July 5, 2018 08:39
Show Gist options
  • Save dmitryshelomanov/65bfe38c6b643d2eb6975dac6ed1a645 to your computer and use it in GitHub Desktop.
Save dmitryshelomanov/65bfe38c6b643d2eb6975dac6ed1a645 to your computer and use it in GitHub Desktop.
compose
const compose = (...funcs) =>
funcs.reduce((a, b) => (...args) => a(b(...args)), arg => arg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment