def sum[A](xs: List[A])(implicit m: Monoid[A]): A =
if(xs.isEmpty) m.unit

implicit def list2ordered[A](x: List[A])
(implicit elem2ordered: A => Ordered[A]): Ordered[List[A]] =
...

implicit def int2ordered(x: Int): Ordered[Int]

def sort[A](xs: List[A])(implicit a2ordered: A => Ordered[A]) = ...

sort(yss)

sort(yss)(xs: List[Int] => list2ordered[Int](xs)(int2ordered))

implicit def magix[A](x: A)(implicit a2ordered: A =>
Ordered[A]): Ordered[A]): Ordered[A] = a2ordered(x)

sort(arg)(x => magic(x)(x => magic(x)(x => ... )))

ttcs(p.c) = {c}

ttcs(p.c[targs]) = {c}

ttcs(p.type) = ttcss(T)，p的类型是T

ttcs(T1 with ... with Tn) = ttcs(T1) U ... U ttcs(Tn)

complexity(p.c) = 1 + complexity(p)

complexity(p.c[targs]) = 1 + Σcomplexity(targs)

complexity(p.type) = 0

complexity(p.type) = 1 + complexity(T)，p的类型是T

complexity(T1 with ... with Tn) = Σcomplexity(Ti)

List[List[Int]] => Ordered[List[List[Int]]],
List[Int] => Ordered[List[Int]]
Int => Ordered[Int]

val ys = List(new IllegalArgumentException, new ClassCastException, new Error)

Throwable => Ordered[Throwable],
Throwable => Ordered[Throwable],
...