Software · The Function
Write a contract before an implementation
Use a simple example to distinguish the information a function receives from the result it promises. Keep side effects visible.
Try this
Describe an imaginary function's input, output and failure cases in plain language, then supply three examples.
Reflect
Which input would reveal an ambiguity in the contract?
Take it further · optional follow-up
Ask someone to predict the output for a new example from your contract alone. Clarify any ambiguity before describing an implementation.
Compare with another activity · Property & Renewal
The Handover: Design a useful record →Prepared study prompt · not an editor-reviewed research article
