I originally implemented it that way, but I wasn't sure of the consequences of casting a generator to an iterator.