9.3 How to Declare a Swift Function
A Swift function is declared using the following syntax:
func <function name> (<para name>: <para type>,
<para name>: <para type>, ... ) -> <return type> {
// Function code
}
This combination of function name, parameters and return type are referred to as the function signature. Explanations of the various fields of the function declaration are as follows:
•func – The prefix keyword used to notify the Swift compiler that this is a function.
•<function name> - The name assigned to the function. This is the name by which the function will be referenced when it is called from within the application code.
•<para name> - The name by which the parameter is to be referenced in the function code...