In this talk I explain generators, a new Javascript feature coming in ES6. I then discuss the Monocle.js library, which uses generators to make writing asynchronous code much cleaner.
value and done Calling next() with a parameter sends that value in as the result of the generator’s last yield Calling next() always returns whatever is after the next yield statement in the generator, even if you are also sending in a value