WE WOULD LIKE TO WRITE CODE THAT IS CORRECT, and have evidence on hand that it is correct. It can help with both issues to think about the "size" of a function.
One way to find out what those types should be is to find the examples to check in problem domain terms, before writing the function.