Rewrite the `for` loop syntax