const pipe = (x0, ...fns) => fns.reduce( (x, f) => f(x), x0 );
const pipe = (...fns) => fns.reduce( (f, g) => (...args) => g(f(...args)) )