//函数func sayAfternoon(personName: String) -> String { let say = "Hello afternoon " + personName + "!" return say}sayAfternoon("王丽媛")//多参量函数func sayHello(personName: String, isExsit: Bool) { if isExsit { print ("已经说过了") } else { print ("hello " + personName) }}sayHello("jiawei", isExsit: true)//多重返回值函数func minMax(array: [Int]) -> (min: Int, max: Int) { var currentMin = array[0] var currentMax = array[0] for value in array[1..currentMax {
currentMax = value
}
}
return (currentMin, currentMax)
}