title: Reduce array to set in Swift
body: <p>I am trying to reduce an array of objects to a set in Swift and this is my code:</p>
  <pre><code>objects.reduce(Set&lt;String&gt;()) { $0.insert($1.URL) }
  </code></pre>
  <p>However, I get an error:</p>
  <blockquote>
  <p>Type of expression is ambiguous without more context.</p>
  </blockquote>
  <p>I do not understand what the problem is, since the type of URL is definitely String. Any ideas?</p>