From 9b9785a44b6dda35c54f758d5f4b1973de3e5bfe Mon Sep 17 00:00:00 2001 From: 0x54321 <34850754+0x54321@users.noreply.github.com> Date: Sun, 3 Nov 2019 15:43:11 -0500 Subject: [PATCH 1/2] Update match-expressions.md Added missing parentheses. --- _overviews/scala-book/match-expressions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_overviews/scala-book/match-expressions.md b/_overviews/scala-book/match-expressions.md index 3168a2bedb..fc0f58bf5b 100644 --- a/_overviews/scala-book/match-expressions.md +++ b/_overviews/scala-book/match-expressions.md @@ -202,17 +202,17 @@ count match { } ``` -Here’s a variation of that example that uses parentheses +Here’s a variation of that example that uses parentheses: ```scala count match { case 1 => { println("one, a lonely number") } - case x if x == 2 || x == 3 => { + case x if (x == 2 || x == 3) => { println("two's company, three's a crowd") } - case x if x > 3 => { + case x if (x > 3) => { println("4+, that's a party") } case _ => { From 5aa15c660f27754651c4e40a6b37b4015c99ff0c Mon Sep 17 00:00:00 2001 From: 0x54321 <34850754+0x54321@users.noreply.github.com> Date: Sun, 3 Nov 2019 15:55:41 -0500 Subject: [PATCH 2/2] Update match-expressions.md Change "parentheses" to "curly braces" --- _overviews/scala-book/match-expressions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_overviews/scala-book/match-expressions.md b/_overviews/scala-book/match-expressions.md index fc0f58bf5b..e06a178a11 100644 --- a/_overviews/scala-book/match-expressions.md +++ b/_overviews/scala-book/match-expressions.md @@ -202,17 +202,17 @@ count match { } ``` -Here’s a variation of that example that uses parentheses: +Here’s a variation of that example that uses curly braces: ```scala count match { case 1 => { println("one, a lonely number") } - case x if (x == 2 || x == 3) => { + case x if x == 2 || x == 3 => { println("two's company, three's a crowd") } - case x if (x > 3) => { + case x if x > 3 => { println("4+, that's a party") } case _ => {