UNPKG

iter-tools-es

Version:
8 lines (6 loc) 169 B
const identity = x => x; function pipe(...fns) { if (!fns.length) fns = [identity]; return fns.reduce((f, g) => (...args) => g(f(...args))); } exports.pipe = pipe;