Does this work the same as if you yield the values inside the for loop?