Extend the pipe Utility to Support Async Functions and Error Propagation
Extend the Part 1 pipe() to handle async functions in the pipeline — each function may return a plain value or a Promise, and the next function in the chain should always receive the resolved value. If any function throws or rejects, the entire pipe should short-circuit and reject with that error. This async pipe is used in serverless middleware, data transformation pipelines, and stream processing architectures.