Implement a compose middleware function so that async middlewares like Koa-style f1, f2, f3 (each calling next()) execute in the correct nested order.

reported at ByteDance/TikTok

say it first

Answer it out loud, in your own words. Then compare.

Interviewers listen for how you get there, not only where you land. The answer opens once you have tried.