Unit 06 · reflection
Unit 6 Function Contract Check
Select one function you wrote and document it without showing its body first:
FUNCTION NAME:
INPUTS:
RETURN VALUE:
SIDE EFFECTS:
KNOWN FAILURE / BOUNDARY:
Then inspect the actual implementation.
Does the code obey the contract you just wrote? If not, decide whether the contract is wrong or the implementation is wrong and explain the evidence.
Finally, name one block of code you did not turn into a function and explain why leaving it inline was clearer.