title: Swift 3.0 closure expression: what if the variadic parameters not at the last place in the parameters list?
body: <h2>Update at 2016.09.19</h2>
  
  <p>There is a tricky, indirect way to use variadic parameters before some other parameters in closure expression parameters list, haha</p>
  
  <pre><code>let testClosure = { (scores: Int...) -&gt; (_ name: String) -&gt; String in
      return { name in
          return "Happy"
      }
  }
  let k = testClosure(1, 2, 3)("John")
  </code></pre>
  
  <p>And I found some related issues in bugs.swift.org:
  <a href="https://bugs.swift.org/browse/SR-2475?jql=text%20~%20%22closure%20variadic%22" rel="nofollow">SR-2475</a>
  <a href="https://bugs.swift.org/browse/SR-494" rel="nofollow">SR-494</a></p>
  
  <h2>Original Post</h2>
  
  <p>According to the <a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html#//apple_ref/doc/uid/TP40014097-CH11-ID94" rel="nofollow">document of Swift 3.0</a>, for a closure expression, "variadic parameters can be used if you name the variadic parameter"(see Closure Expresssion Syntax part). But for Swift 2.x, the description is "Variadic parameters can be used if you name the variadic parameter <strong>and place it last in the parameter list</strong>", the border part has been removed in Swift 3.0 document, is it means variadic parameter can be a argument of closure expression even it is not at the last place? If so, why the codes below can't compile successfully?</p>
  
  <pre><code>let testClosure = { (scores: Int..., name: String) -&gt; String in
      return "Happy"
  }
  let k = testClosure(1, 2, 3, "John") // Missing argument for parameter #2 in call
  </code></pre>
  
  <p>If the argument label can be used in the call, I think the compiler can compile the code above successfully, but in Swift 3.0, closure expression's argument labels are regarded as Extraneous.</p>
  
  <p>Besides, Swift 3.0 document indicates that the parameters in closure expression syntax can be in-out parameters, but Swift 3.0 said that closure expression syntax can use constant parameters, variable parameters, and inout parameters. Why Apple removed descriptions like constant parameters, variable paramters, is it because in Swift 3.0, the parameters can't be <code>var</code>?</p>
  
  <p>Thank you very much for your help!</p>