by blarney_stone · 12y ago · 0 comments
From https://developer.apple.com/library/prerelease/ios/documenta... :
You use function types just like any other types in Swift. For example, you can define a constant or variable to be of a function type and assign an appropriate function to that variable:
var mathFunction: (Int, Int) -> Int = addTwoInts
mathFunction can now be passed around, fed in as a parameter in another function, etc. mathFunction is for all purposes a function pointer.