Mastering macOS Programming
上QQ阅读APP看书,第一时间看更新

Closures with multiple arguments

Just like any function, a closure may take as many arguments as necessary:

let myIntOp: (Int, Int) -> Int = {x, y in return x * y}