 <p>Maybe you are confused by the fact, that the class <code>Ordering</code> is declared as <code>Ordering&lt;T&gt;</code>, but the return value of the <code>onResultOf</code> method is <code>Ordering&lt;F&gt;</code>.</p> <p>The first type argument of the <code>Function</code>, you are providing to <code>onResultOf</code> is the type argument of the result.</p> <p>That also means, that <code>Value</code> is not forced to be a subtype of <code>Map.Entry</code>.</p>