Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I got the syntax right? Was completely guessing.


Yep. Nowadays you'd be more likely to see it as:

    return () => {
      const next = i;
      i = i * 2;
      return next;
    }
But in this case the two are equivalent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: