Binary Tree iterator with ES6 generators

1 Β· Minko Gechev Β· Sept. 12, 2014, 7:07 p.m.
ES6 specification is being clarified every passed day! One of the key features of the new version of the language are the generators. Generators (a.k.a. semicoroutines) will play quite important role after they are being officially released. They could be used to simplify the asynchronous control flow of any JavaScript program (look at co). Another important role is using them for creating iterators. In this blog post we are going to take a look at how could be implemented iterator of binary sea...