domenic / count-to-6

An intro to some ES6 features via a set of self-guided workshops.
Other
326 stars 76 forks source link

Generators #7

Open domenic opened 10 years ago

domenic commented 10 years ago

Too big?

Focus on lazy sequences?

Make them write a combinator, e.g. takeWhile?

https://github.com/lukehoban/es6features#generators

jonathanong commented 10 years ago

please!

i think a concept people should know, at least for using for control flow, is that generators are not just "iterators", but simply allow "arbitrary execution". a case to make your own tiny control flow thing would be cool. maybe tie it in with promises.