Swift 정리 : 클로저 축약 표현
let add = {(val1: Int, val2: Int) -> Int in return val1 + val2 } var result = add(10, 20) print(result) //30 func math(x: Int, y: Int, cal: (Int, Int) -> Int) -> Int { return cal(x, y) } result = math(x: 10, y: 20, cal: {(val1: Int, val2: Int) -> Int in return val1 + val2 }) //클로저 소스를 매개변수에 직접 작성 print(result) func math(x: Int, y: Int, cal: (Int, Int) -> Int) -> Int { return cal(x, y) } var resu..