Check out example codes for "swift function in a variable". It will help you in understanding the concepts better.

Code Example 1

func aFunction() -> <RETURN_TYPE> {
	return <RETURN_TYPE>
}

//call function like this
aFunction()

Code Example 2

//function trying to be called

func aFunction() {
	print("called function")
}

//call function like this

aFunction()

Code Example 3

var pendingFunction: ((Double, Double) -> Double)

Learn ReactJs, React Native from akashmittal.com