Skip to content

Commit fb749fa

Browse files
authored
Merge pull request #1173 from evis/patch-1
little fixes in "Explicit term inference" article
2 parents 318623b + ee919fb commit fb749fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2020-11-06-explicit-term-inference-in-scala-3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ This pattern was particularly cumbersome to implement prior to Scala 3.
8585
A typical approach would be the following:
8686

8787
```scala
88-
implicit class ListTryExtension[A](val in: List[Try[A]]) extends AnyVal {
88+
implicit class ListTryExtension[A](private val in: List[Try[A]]) extends AnyVal {
8989
def collectSucceeded: List[A] = ls.collect { case Success(a) => a }
9090
def getIndexOfFirstFailure: Option[Int] =
9191
in.zipWithIndex.find { case (t, _) => t.isFailure }
@@ -224,7 +224,7 @@ object Future {
224224
}
225225
```
226226

227-
We note again that we had to provide a name which might not be used for the variable. The `implictly` function from Scala 2 is renamed to `summon` in Scala 3.
227+
We note again that we had to provide a name which might not be used for the variable. The `implicitly` function from Scala 2 is renamed to `summon` in Scala 3.
228228

229229
Finally the special import syntax allows users to explicitly import `given` instances by type rather than by name. This makes more sense since we usually refer to them by type as well.
230230

0 commit comments

Comments
 (0)