2
Iterable和IterableLike有什么区别?Scala Iterable和IterableLike的区别和用法
还有哪些appropiate或预期每个用途?
即是说,下面的方法在参数中接受的集合的种类有何不同?
def f[A](c: Iterable[A]) = c.foreach(print)
f: [A](c: Iterable[A])Unit
def g[A,B](c: IterableLike[A,B]) = c.foreach(print)
g: [A, B](c: scala.collection.IterableLike[A,B])Unit
[可能是“特质”和“模板特质”之间的差异的重复?](http://stackoverflow.com/questions/4599937/what-is-the-difference-between-a-trait - 和 - 一个模板性状) – 2015-07-03 14:26:49