Hacker News new | ask | show | jobs
by Someone 1213 days ago
> And a for loop can be executed 0 times, so without a mechanism for a fallback it might not have a value to yield.

I would think that and the similar case where no iteration hits break are solvable by having a for loop return an optional type.