rolftimmermans/event-iterator

Confusing sample code in readme

greim opened this issue · 1 comments

greim commented
for await (const click of element::subscribe("click") {
  /* Asynchronously iterate over click events on the element. */
}

I assume the :: is the proposed bind operator? That proposal is apparently in limbo these days. Also I think it's missing a closing paren. Between those things the introductory code is a bit of a head-scratcher. Thanks.

Great points! Would you mind creating a pull request? I'll happily merge any documentation improvements!