Scala Tour Implicit Conversion Example
问题 I am having a hard time understanding what this piece of code does exactly: import scala.language.implicitConversions implicit def list2ordered[A](x: List[A]) (implicit elem2ordered: A => Ordered[A]): Ordered[List[A]] = new Ordered[List[A]] { //replace with a more useful implementation def compare(that: List[A]): Int = 1 } It comes from the Scala Tour and it is in the section "Implicit Conversions". I understand that list2ordered takes a List[A] that comes from the left hand side of List(1, 2