automatically call generator.next() when for-looping over a generator function.