How to forward functions with variadic parameters?
In Swift, how do you convert an Array to a Tuple? The issue came up because I am trying to call a function that takes a variable number of arguments inside a function that takes a variable number of arguments. // Function 1 func sumOf(numbers: Int...) -> Int { var sum = 0 for number in numbers { sum += number } return sum } // Example Usage sumOf(2, 5, 1) // Function 2 func averageOf(numbers: Int...) -> Int { return sumOf(numbers) / numbers.count } This averageOf implementation seemed reasonable to me, but it does not compile. It gives the following error when you try to call sumOf(numbers) :