Skip to content

Commit 5d8e4fc

Browse files
committed
Fix typos in extension-methods.md
1 parent 1947222 commit 5d8e4fc

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
@@ -199,7 +199,7 @@ extension methods apply everywhere their enclosing object is available as an imp
199199

200200
As another example, consider implementations of an `Ord` type class with a `minimum` value:
201201
```scala
202-
trait Ord[T]
202+
trait Ord[T] {
203203
def (x: T) compareTo (y: T): Int
204204
def (x: T) < (y: T) = x.compareTo(y) < 0
205205
def (x: T) > (y: T) = x.compareTo(y) > 0
@@ -213,7 +213,7 @@ As another example, consider implementations of an `Ord` type class with a `mini
213213
}
214214

215215
class ListOrd[T: Ord] extends Ord[List[T]] {
216-
def (xs: List[T]) compareTo (ys: List[T]): Int = (xs, ys) match
216+
def (xs: List[T]) compareTo (ys: List[T]): Int = (xs, ys) match {
217217
case (Nil, Nil) => 0
218218
case (Nil, _) => -1
219219
case (_, Nil) => +1

0 commit comments

Comments
 (0)