title: swift- Cannot convert value of type '[Int]' to expected argument type '[_]'
body: <p>I'm trying to implement a zip function as an extension to Array, and I'm intending for it to be used like this:</p>
  
  <pre><code>let myKeys = ["a","b","c"]
  let myVars = [1,2,3]
  myKeys.zip(myVars) // ["a":1,"b":2,"c":3]
  </code></pre>
  
  <p>Here is my attempt:</p>
  
  <pre><code>extension Array {
      public func zip&lt;T,U&gt;(vals: [U]) -&gt; [T:U] {
  
          var dict: [T:U] = Dictionary()
  
          for (i,key) in self.enumerate() {
              if let k = key as? T {
                  dict[k] = vals[i]
              }
          }
  
          return dict
      }
  }
  
  let myKeys = ["a","b","c"]
  let myVars = [1,2,3]
  myKeys.zip(myVars) // ERROR: Cannot convert value of type '[Int]' to expected argument type '[_]'
  </code></pre>
  
  <p>On the last line I am getting an error that I do not completely understand. I understand it to mean that I'm passing an [Int] and it's expecting an [_]. But isn't _ just a generic placeholder here? Why would it complain about receiving an [Int]?</p>
  
  <p>Also, if I implement zip as a class function it has no issues:</p>
  
  <pre><code>class func zip&lt;T,U&gt;(keys keys: [T], vals: [U]) -&gt; [T:U] {
  
      var dict: [T:U] = Dictionary()
  
      for (i,key) in keys.enumerate() {
          dict[key] = vals[i]
      }
  
      return dict
  }
  
  zip(keys: myKeys,vals: myVals) // ["a":1,"b":2,"c":3]
  </code></pre>
  
  <p>Any thoughts on this would be much appreciated!</p>