Why does the first term have to be outside the `while`?