- Mastering macOS Programming
- Stuart Grimshaw
- 31字
- 2021-07-02 22:54:33
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}
Just like any function, a closure may take as many arguments as necessary:
let myIntOp: (Int, Int) -> Int = {x, y in return x * y}