What value is printed by this left-to-right pipeline?

from Currying and function composition
Node 24 beginner 2 min

What value is printed by this left-to-right pipeline?

JavaScript
const pipe = (...steps) => input =>
  steps.reduce((value, step) => step(value), input);

const double = value => value * 2;
const subtractOne = value => value - 1;

console.log(pipe(double, subtractOne)(3));
Open in playground
Report an error