title: Passing an array to a function with variable number of args in Swift
body: <p>In <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-XID_1">The Swift Programming Language</a>, it says:</p>
  
  <blockquote>
    <p>Functions can also take a variable number of arguments, collecting them into an array.</p>
  
  <pre><code>  func sumOf(numbers: Int...) -&gt; Int {
        ...
    }
  </code></pre>
  </blockquote>
  
  <p>When I call such a function with a comma-separated list of numbers (`sumOf(1, 2, 3, 4), they are made available as an array inside the function.</p>
  
  <p>Question: what if I already have an array of numbers that I want to pass to this function?</p>
  
  <pre><code>let numbers = [1, 2, 3, 4]
  sumOf(numbers)
  </code></pre>
  
  <p>This fails with a compiler error, “Could not find an overload for '__conversion' that accepts the supplied arguments”. Is there a way to turn an existing array into a list of elements that I can pass to a variadic function?</p>