Andrey (azangru) wrote,
Andrey
azangru

Achievement unlocked: today, for the first time, I wrote an asynchronous iterator. Using an async generator (also for the first time; I never felt a need for them before), nothing as fancy as writing it completely from scratch as an object with Symbol.asyncIterator. I wanted to transform an array of strings into a chain of sequentially executed promises. Previously, I would have used a .reduce starting with a Promise.resolve(). But this time, I tried the async generator syntax, and it seems to have worked beautifully.
Subscribe

  • (no subject)

    Two clips left a particularly deep impression on me over the last couple of days. One is Pelosi's reply to a journalist: Not the first of her…

  • (no subject)

    Is the CNN making the point for Bret Weinstein (transmitting the message of Geert Vanden Bossche)? So strange to see.

  • (no subject)

    The blame game that DiBlasio plays in this clip is disgusting. Instead of saying, we, your leaders, were wrong; we miscalculated; we thought that the…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments