Skip to content

Commit 2c5b750

Browse files
committed
Fix typos
1 parent 561091c commit 2c5b750

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

content/typeclasses-syntax.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ The possible variations are presented in the following.
419419

420420
// Alias with using clause
421421
given [A](using Ord[A]): Ord[List[A]] =
422-
ListOrd[A]
422+
ListOrd[A]()
423423

424424
// Concrete class instance
425425
given Context with {}
@@ -462,7 +462,7 @@ The possible variations are presented in the following.
462462

463463
// Alias with using clause
464464
given [A](using Ord[A]) => Ord[List[A]] =
465-
ListOrd[A]
465+
ListOrd[A]()
466466

467467
// Concrete class instance
468468
given Context
@@ -491,11 +491,11 @@ one would have to put the function in parentheses, in both current and proposed
491491
def compare(x: Int, y: Int) = ...
492492

493493
// Parameterized typeclass
494-
given listOrd: [A: Ord]: Ord[List[A]] with
494+
given listOrd[A: Ord]: Ord[List[A]] with
495495
def compare(x: List[A], y: List[A]) = ...
496496

497497
// Typeclass with using clause
498-
given [A](using Ord[A]): Ord[List[A]] with
498+
given listOrd[A](using Ord[A]): Ord[List[A]] with
499499
def compare(x: List[A], y: List[A]) = ...
500500

501501
// Simple alias
@@ -507,7 +507,7 @@ one would have to put the function in parentheses, in both current and proposed
507507

508508
// Alias with using clause
509509
given listOrd[A](using Ord[A]): Ord[List[A]] =
510-
ListOrd[A]
510+
ListOrd[A]()
511511

512512
// Concrete class instance
513513
given context: Context with {}
@@ -546,7 +546,7 @@ one would have to put the function in parentheses, in both current and proposed
546546

547547
// Alias with using clause
548548
given [A](using Ord[A]) => Ord[List[A]] as listOrd =
549-
ListOrd[A]
549+
ListOrd[A]()
550550

551551
// Concrete class instance
552552
given Context as context
@@ -588,7 +588,7 @@ As an alternative, here is a version of new style given, but using the current `
588588

589589
// Alias with using clause
590590
given listOrd: [A](using Ord[A]) => Ord[List[A]] =
591-
ListOrd[A]
591+
ListOrd[A]()
592592

593593
// Concrete class instance
594594
given context: Context // this would be a change of meaning from abstract given

0 commit comments

Comments
 (0)