Spot the bug in the account-name pipeline

from Currying and function composition
Node 24 intermediate 4 min 1 issue to find

Find the contract error in this generated account-name pipeline.

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

const load = async id => ({ id, name: 'Ada' });
const getName = account => account.name;

const loadName = pipe(load, getName);
loadName(7).then(console.log);
Open in playground
Report an error