The code itself doesn’t tell us anything about what we expect to happen. Most of the problems can be addressed by introducing context and semantics. For our function, we only want to get something that is and implements the right methods. The actual data structure is now completely irrelevant to the semantics of our software.
Sort: