Skip to content

Instantly share code, notes, and snippets.

@joeynimu
Created Apr 23, 2019
Embed
What would you like to do?
JS Utility Functions
// a function that composes any number of functions
const compose = (..fns) => x => fns.reduceRight((acc, fn) => fn(acc), x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment