Closed
Description
I think I have found two mistakes in documentation.
- In https://github.com/lampepfl/dotty/blob/master/docs/docs/reference/contextual/delegates.md in implementation of listOrd there is:
def compare(xs: List[T], ys: List[T]): Int = (xs, ys) match {
[...]
case (x :: xs1, y :: ys1) =>
val fst = ord.compare(x, y)
if (fst != 0) fst else xs1.compareTo(ys1)
}
but should be:
def compare(xs: List[T], ys: List[T]): Int = (xs, ys) match {
[...]
case (x :: xs1, y :: ys1) =>
val fst = ord.compare(x, y)
if (fst != 0) fst else compare(xs1, ys1)
}
- In https://github.com/lampepfl/dotty/blob/master/docs/docs/reference/contextual/extension-methods.md#operators there is:
def (x: String) < (y: String) = ...
def (x: Elem) +: (xs: Seq[Elem]) = ...
"ab" + "c"
1 +: List(2, 3)
but should be:
def (x: String) < (y: String) = ...
def (x: Elem) +: (xs: Seq[Elem]) = ...
"ab" < "c"
1 +: List(2, 3)