title: How to pass a Lambda to toSortedSet() in Kotlin
body: <p>I'm a little confused why this doesn't work. I'm having a simple <code>Iterable</code> of <code>String</code> that I want to sort via <code>toSortedSet()</code> my own way. I wanted to pass a lambda to it like this:</p>
  <pre><code>myStringIterable.toSortedSet({a,b -&gt; a.compareTo(b)}) 
  </code></pre>
  <p>That, however, doesn't seem to work. The error says</p>
  <blockquote>
  <p>Type mismatch. Required kotlin.Comparator &lt; String&gt;</p>
  <p>Found: (String,String) -&gt; Int</p>
  </blockquote>
  <p>A Comparator is a <em>Functional Interface</em>, so I should be able to pass it as a Lambda, shouldn't I?</p>