I just looked at the List.flatMap
declaration and was kind of surprised by this.
final override def flatMap[B, That](f: A => GenTraversableOnce[B])
(implicit bf: CanBuildFrom[List[A], B, That]): That
Where object List
defines:
implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, List[A]] =
ReusableCBF.asInstanceOf[GenericCanBuildFrom[A]]
So, if we invoke flatMap
on a List
we will get the List
and I don't see any point in That
type if it will always be deduced to List[B]
(because of the implicit
).