title: Swift Error: Can't invoke (..) with an argument list of type (([String) -> (Int, String))
body: <p>I wanted to create an Array extension that transforms an array into a Dictionary with generic Key/Value types.</p>
  
  <p>This is my code:</p>
  
  <pre><code>extension Array  {
      func transformToDictionary&lt;K: Hashable, V&gt;(@noescape mappingFunction: (Array.Generator.Element) -&gt; (K, V)) -&gt; [K: V] {
          var dict: [K: V] = [:]
          for el in self {
              let result = mappingFunction(el)
              dict[result.0] = result.1
          }
          return dict
      }
  }
  </code></pre>
  
  <p>This works for some cases like:</p>
  
  <pre><code>let stringArray = ["String1", "String2"]
  stringArray.transformToDictionary({ (element: String) -&gt; (Int, String) in
      return (element.hashValue, element)
  })
  </code></pre>
  
  <p>But doesn't work in another case like:</p>
  
  <pre><code>let nestedStringArray = [["String1"], ["String2"]]
  stringArray.transformToDictionary({ (element: [String]) -&gt; (Int, String) in
       return (element.first!.hashValue, element.first!)
  })
  </code></pre>
  
  <p>This will lead to a compiler error saying:</p>
  
  <blockquote>
    <p>Can't invoke 'transformToDictionary' with an argument list of type
    (([String) -> (Int, String))</p>
  </blockquote>
  
  <p>Did I do anything wrong here or is this a Swift compiler bug?</p>