Skip to content

Commit dacc9be

Browse files
authored
docs: reword pattern matching comment (#2188)
1 parent b123dcb commit dacc9be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_tour/pattern-matching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def matchTest(x: Int): String = x match {
3636
case 2 => "two"
3737
case _ => "other"
3838
}
39-
matchTest(3) // prints other
40-
matchTest(1) // prints one
39+
matchTest(3) // returns other
40+
matchTest(1) // returns one
4141
```
4242
This match expression has a type String because all of the cases return String. Therefore, the function `matchTest` returns a String.
4343

0 commit comments

Comments
 (0)