Slide 19
Slide 19 text
͖ͬ͞ͷྫΛ͏Ұ
// ͬͪ͜লུͰ͖ͳ͍͕ɾɾɾ
func calculate(number1: Int, number2: Int, calc: ((Int, Int) -> Int)) -> Int {
return calc(number1, number2)
}
// ͬͪ͜লུ͢Δͱɾɾɾ
calculate(number1: 10, number2: 10, calc: { (num1: Int, num2: Int) -> Int
return num1 + num2
})
͜ͷ͍Ϋϩʔδϟ͕͋Δ͡ΌΖʁ