The following is safe and pure, due to unique conversion in pure functions.
```d
    if (changed)
        return r;
    else
        return s;
```