Move `if` into `for`?