Recipe for Designing Functions in programming languages

Recipe for Designing Functions:

1. Examples
    What should your function do?
    Type a couple of examples calls.
    Pick a name (often a verb or verb phrase):
    What is a short answer to “What does your functions do?”
2. Type Contract
    What are the parameter types?
    What type of value is returned?
3. Header
    Pick meaningfull parameters names.
4. Description
    Mention every parameter in your descriptions.
    Describe the return value.
5. Body
6. Test
    Run the examples