Legitimate uses of IIFEs?

Fabrício Matté ultcombo at gmail.com
Sat Dec 19 20:47:57 UTC 2015


Good call, Dmitry. Async IIFEs are also useful to parallelize different
sequences of async operations. E.g.:

```js
async function main() {
  await* [
    (async () => await seq1op2(await seq1op1()))(),
    (async () => {
      await seq2op1();
      await seq2op2();
    })(),
  ];
}
```

Here is a more solid example
<https://github.com/JSRocksHQ/harmonic/blob/81979aee6c8c9ca981a69d694e0fe025ad7d1669/src/bin/core.js#L23-L37>
.

/fm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151219/e5af9383/attachment.html>


More information about the es-discuss mailing list