From 04896fd1915b5252970b76916e528436741b6b8a Mon Sep 17 00:00:00 2001 From: Andrii Date: Mon, 10 Jul 2017 21:57:07 +0300 Subject: [PATCH 1/2] fix a typo, add missing space --- tutorials/tour/_posts/2017-02-13-pattern-matching.md | 2 +- tutorials/tour/_posts/2017-02-13-traits.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..9820df8673 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. +Subtypes of traits can be used where a trait is required. ```tut import scala.collection.mutable.ArrayBuffer From baa4453b3bc2669613ab46b2e217dca397f5dae0 Mon Sep 17 00:00:00 2001 From: Andrii Date: Wed, 12 Jul 2017 19:39:28 +0300 Subject: [PATCH 2/2] apply PR suggestion --- tutorials/tour/_posts/2017-02-13-traits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/tour/_posts/2017-02-13-traits.md b/tutorials/tour/_posts/2017-02-13-traits.md index 9820df8673..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 trait is required. +Where a given trait is required, a subtype of the trait can be used instead. ```tut import scala.collection.mutable.ArrayBuffer