From d8374fb61863f931f35d1863f582611d4ed7133a Mon Sep 17 00:00:00 2001 From: Pu Zhao Date: Sat, 13 Jul 2019 22:48:47 -0500 Subject: [PATCH 1/2] add space in function call in pattern matching page --- _tour/pattern-matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tour/pattern-matching.md b/_tour/pattern-matching.md index 20ca742c70..735adf2fd5 100644 --- a/_tour/pattern-matching.md +++ b/_tour/pattern-matching.md @@ -116,7 +116,7 @@ In the `case Email(sender, _, _) if importantPeopleInfo.contains(sender)`, the p 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 { From 8d8bbd87efb231e96a8dc2ec3ab448264a647462 Mon Sep 17 00:00:00 2001 From: Pu Zhao Date: Sun, 14 Jul 2019 08:26:45 -0500 Subject: [PATCH 2/2] add space in function call in pattern matching page for other langs --- _ba/tour/pattern-matching.md | 2 +- _ja/tour/pattern-matching.md | 2 +- _ru/tour/pattern-matching.md | 2 +- _zh-cn/tour/pattern-matching.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_ba/tour/pattern-matching.md b/_ba/tour/pattern-matching.md index 9e304a3fd0..0403fd0375 100644 --- a/_ba/tour/pattern-matching.md +++ b/_ba/tour/pattern-matching.md @@ -123,7 +123,7 @@ U `case Email(email, _, _) if importantPeopleInfo.contains(email)`, uzorak se po Možete podudarati samo tip ovako: ```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/_ja/tour/pattern-matching.md b/_ja/tour/pattern-matching.md index dd032ed48e..f5d506bdf4 100644 --- a/_ja/tour/pattern-matching.md +++ b/_ja/tour/pattern-matching.md @@ -126,7 +126,7 @@ println(showImportantNotification(importantSms, importantPeopleInfo)) 以下のように型のみでマッチすることができます。 ```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/_ru/tour/pattern-matching.md b/_ru/tour/pattern-matching.md index 9a46a74005..a3d4dda5a4 100644 --- a/_ru/tour/pattern-matching.md +++ b/_ru/tour/pattern-matching.md @@ -116,7 +116,7 @@ println(showImportantNotification(importantSms, importantPeopleInfo)) Вы можете сопоставлять только по типу как в примере: ```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/_zh-cn/tour/pattern-matching.md b/_zh-cn/tour/pattern-matching.md index 7ea9fec48e..803a26304c 100644 --- a/_zh-cn/tour/pattern-matching.md +++ b/_zh-cn/tour/pattern-matching.md @@ -118,7 +118,7 @@ println(showImportantNotification(importantSms, importantPeopleInfo)) 也可以仅匹配类型,如下所示: ```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 {