Implement first version of generator iteration