function stream(log, ...args) { args.reduce((acc, func) => { const prom = new Promise(func); return acc.then(() => prom).then(log); }, Promise.resolve()); }