Passing lists from one function to another in Swift
问题 I can\'t quite understand why I can\'t past an Int[] from one function to another: func sumOf(numbers: Int...) -> Int { var sum = 0 for number in numbers { sum += number } return sum } func average(numbers:Int...) -> Double { var sum = sumOf(numbers) return Double(sum) / Double(numbers.count) } This gives me the following error: Playground execution failed: error: <REPL>:138:19: error: could not find an overload for \'__conversion\' that accepts the supplied arguments var sum = sumOf(numbers)