Skip to content

Commit 5307532

Browse files
committed
Fix typos in extension-methods.md
1 parent 730bb5e commit 5307532

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/other-new-features/extension-methods.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ letting the expected type distinguish which instance we want to use:
226226

227227
As another example, consider implementations of an `Ord` type class with a `minimum` value:
228228
```scala
229-
trait Ord[T]
229+
trait Ord[T] {
230230
def (x: T) compareTo (y: T): Int
231231
def (x: T) < (y: T) = x.compareTo(y) < 0
232232
def (x: T) > (y: T) = x.compareTo(y) > 0
@@ -240,7 +240,7 @@ As another example, consider implementations of an `Ord` type class with a `mini
240240
}
241241

242242
class ListOrd[T: Ord] extends Ord[List[T]] {
243-
def (xs: List[T]) compareTo (ys: List[T]): Int = (xs, ys) match
243+
def (xs: List[T]) compareTo (ys: List[T]): Int = (xs, ys) match {
244244
case (Nil, Nil) => 0
245245
case (Nil, _) => -1
246246
case (_, Nil) => +1

0 commit comments

Comments
 (0)