Can use both for loops and .next() calls in single generator
Converting StopIteration handling to GeneratorExit handling.
Using sets instead of lists for getting function args