title: Type parameter of minBy[B](f: ((A, B)) ⇒ B)(implicit cmp: Ordering[B]): (A, B)
body: <p>The trait <code>Map[A,+B]</code> has a method</p>
  
  <pre><code>def minBy [B] (f: ((A, B)) ⇒ B)(implicit cmp: Ordering[B]): (A, B)
  </code></pre>
  
  <p>I expected the <code>B</code> of the trait to be the same as the one in the method, but then I can't still make sense of this:</p>
  
  <pre><code>val m2 = Map('a -&gt; "1", 'b -&gt;"2" ,'c -&gt;"3")
  m2.minBy((t:(Symbol,String))=&gt;Integer.parseInt(t._2))
  </code></pre>
  
  <p>Here, <code>B</code> of <code>Map[A,+B]</code> is <code>String</code>, but <code>B</code> of <code>minBy</code> is <code>Int</code> - or err I?</p>
  
  <p>So I expected the type of the method to be rather</p>
  
  <pre><code>def minBy [C] (f: ((A, B)) ⇒ C)(implicit cmp: Ordering[C]): (A, B)
  </code></pre>
  
  <p>But thats not what the source says.</p>
  
  <p>If both are distinct, where should I have known?
  If they are not - can you spot, and point out, my mistake?</p>