标签: swift
import Foundation func test(_ a:Int,b:Int=10)->Int{ return a * b } print(test(2)) //20 //assign func test to a variable var f = test print(f(2)) //error: missing argument for parameter #2 in call
如何在为变量分配函数时使用默认参数?