Each function you have been working with in this chapter has a specific type.
In fact, all functions do.
Function types are made up of the function’s parameter and return types.
Consider the sortedEvenOddNumbers(_:) function.
This function takes an array of integers as an argument and returns a tuple with two arrays of integers.
Thus, the function type for sortedEvenOddNumbers(_:) is expressed as
([Int]) -> ([Int], [Int]).
The function’s parameters are listed inside the left parentheses, and the return type comes after the
You can read this function type as: “A function with one parameter that takes an array of integers and returns a tuple with two arrays containing integers.” For comparison, a function with no arguments ...