Skip to content

Instantly share code, notes, and snippets.

@christianwish
Last active March 6, 2019 12:29
Show Gist options
  • Save christianwish/676a03e0f8c37ef58dc203bd7fb97ea7 to your computer and use it in GitHub Desktop.
Save christianwish/676a03e0f8c37ef58dc203bd7fb97ea7 to your computer and use it in GitHub Desktop.
const compose = (...fns) => x => fns.reduce((v, f) => f(v), x);
const all = xs => xs.reduce((acc, x) => ((!x) ? x : acc), true);
const any = xs => xs.reduce((acc, x) => (x || acc), false);
const not = x => !xs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment