3 ms·
The function definition must work unchanged for any choice of types. In order to “change” their values, it would have to know what other values are possible and
by Twisol 7y ago
The function definition must work unchanged for any choice of types. In order to “change” their values, it would have to know what other values are possible and how to get them.
Frame it as a game: give me a function definition and I will give you a pair of types for which that function is statically ill-defined. You must give me a function that works, without changing how it’s defined, for whatever pair of types I tell you.