how to declare swift function return type code example
Example 1: how to set return type swift
func aFunction() -> <RETURN_TYPE> {
return <RETURN_TYPE>
}
//call function like this
aFunction()
Example 2: swift function in a variable
var pendingFunction: ((Double, Double) -> Double)