You placed return in a separate statement, so your cell always returns, regardless of the if() condition. The condition now only controls whether a value will be yielded before returning.
1. You can return and yield in the same statement: `return yield j;`
2. Wrapping the loop in the else block is unnecessary, since your code will always return if the condition applies.
Thanks @Fabian! I see what you mean, I'm updating the Notebook to explain how...
1. `return yield j;` is used **because it is a single statement** (and `return` **stops the flow of function** ), (not used because of `yield` substitution, not depending on the actual return value)
2. Correcting myself, the else statement isn't necessary (but could be used *instead* of return statement, because it also stops flow of function from reaching infinite-while)