Função do tubo JavaScript

const pipe = (x0, ...fns) => fns.reduce(
    (x, f) => f(x),
    x0
);
Clean Caracal