闭包:类似于OC中的block或者C++中Lambda,可以方便的在类之间进行通信
标准的语法格式:
{ (parameterType) -> (returnType) in statements }
定义一个闭包变量:
var closureName: (parameterType) -> (returnType)
var closureName: ((parameterType) -> (returnType))?