原档:https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Functions.html#//apple_ref/doc/uid/TP40014097-CH10-ID158 函数是完成指定任务的独立代码块. Swift中的函数都有对应的类型,由参数类型和返回值类型共同组成.你可以像使用其他类型一样来使用函数类型,因此,可以将函数作为函…