Sort of. I 'm not sure where the "for v := 1; v <= 2; v++" comes
from. Your yield function is more or less correct, but then the
compiler just calls "simpleIter(yield)".
It's a bit more complicated because the loop can contain break
statements, return statements, or panics. Those cause the generated
yield function to return false.
Ian