by c0balt · 3y ago · 0 comments
I also wonder how defer would be handled. After the last yield? After each yield? Should defer be executed when an iterator is not fully consumed?
This proposal does the opposite. It transforms the loop body into a closure passed into the iterator.