Skip to content

Commit 53633e4

Browse files
committed
work around tut bug
tut doesn't like the last line to be a comment, apparently. I'm not even going to report the problem upstream given that tut is deprecated anyway, the author recommends people switch to mdoc
1 parent 47bf72b commit 53633e4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

_tour/variances.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,17 @@ In the following example, the method `printAnimalNames` will accept a list of an
4040
object CovarianceTest extends App {
4141
def printAnimalNames(animals: List[Animal]): Unit =
4242
animals.foreach {
43-
animal => println(animal.name) }
43+
animal => println(animal.name)
44+
}
4445
}
4546
val cats: List[Cat] = List(Cat("Whiskers"), Cat("Tom"))
4647
val dogs: List[Dog] = List(Dog("Fido"), Dog("Rex"))
4748
49+
// prints: Whiskers, Tom
4850
CovarianceTest.printAnimalNames(cats)
49-
// Whiskers
50-
// Tom
5151
52+
// prints: Fido, Rex
5253
CovarianceTest.printAnimalNames(dogs)
53-
// Fido
54-
// Rex
5554
```
5655

5756
### Contravariance

0 commit comments

Comments
 (0)