0
後SO發佈scala contravariant position on method列表::方法和協方差
我期待在斯卡拉列表[+ A]和我看到這個方法這是很好的,因爲該參數的位置是逆變
def contains[A1 >: A](elem: A1)
我不明白的是這似乎是該::方法定義不會編譯
def ::(x: A): List[A]
是什麼繼續這種方法?哦,他們隱藏真實的簽名?
def ::[B >: A](x: B): List[B]
好的,那他們爲什麼要隱藏真實的簽名?
scaladoc不同風格,可能由不同的作者 – soulcheck 2014-09-30 23:09:29
http://stackoverflow.com/questions/26089746/how-to-explain-map-map-result重複看到有關「scaladoc,用例和該死的謊言」。 – 2014-10-01 00:03:20