diff --git a/tutorials/tour/_posts/2017-02-13-pattern-matching.md b/tutorials/tour/_posts/2017-02-13-pattern-matching.md index 72f4bdea3e..2ee4f705ef 100644 --- a/tutorials/tour/_posts/2017-02-13-pattern-matching.md +++ b/tutorials/tour/_posts/2017-02-13-pattern-matching.md @@ -114,7 +114,7 @@ In the `case Email(email, _, _) if importantPeopleInfo.contains(email)`, the pat You can match on the type like so: ```tut abstract class Device -case class Phone(model: String) extends Device{ +case class Phone(model: String) extends Device { def screenOff = "Turning screen off" } case class Computer(model: String) extends Device { diff --git a/tutorials/tour/_posts/2017-02-13-traits.md b/tutorials/tour/_posts/2017-02-13-traits.md index 74a6bd3eb6..feff4651a6 100644 --- a/tutorials/tour/_posts/2017-02-13-traits.md +++ b/tutorials/tour/_posts/2017-02-13-traits.md @@ -60,7 +60,7 @@ iterator.next() // prints 1 This `IntIterator` class takes a parameter `to` as an upper bound. It `extends Iterator[Int]` which means that the `next` method must return an Int. ## Subtyping -Subtypes of traits can be used where a the trait is required. +Where a given trait is required, a subtype of the trait can be used instead. ```tut import scala.collection.mutable.ArrayBuffer