4 ms·
Yeah, feels like they should use the Haskell IO monad "do" notation style where the await is implicit unless you use let. This would require the scripts to no
by devit 5y ago
Yeah, feels like they should use the Haskell IO monad "do" notation style where the await is implicit unless you use let.
This would require the scripts to no longer be vanilla JavaScript, but it seems easy to extend sucrase/babel to do that transpiling.
- efortis 5y agoIn plain JS: pipe(a, b, c) is equivalent to a().then(b).then(c) function pipe(...functions) { (async () => { let accum; for (const fn of functions) accum = await fn(accum); }()); }