scala/scala — pull request #977 by haraldme (2012-07-23 13:08:29+00:00)
Title: Fix example of Ordering.on in scaladoc for Ordering.

The current scaladoc for Ordering includes an example of using Ordering.on that does not compile; it has too few parentheses, and uses _ as a placeholder argument twice in a function that should only take one argument. Once these issues are fixed, the explicit type parameters to on are no longer needed.

An alternative fix would be something like

.on { case (s, _, i) => (i, s) }