Skip to content

Commit f0126ac

Browse files
committed
fixed num => code
1 parent 19d500a commit f0126ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_overviews/scala3-book/control-structures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@ When you need to access the catch-all, default value in a `match` expression, ju
387387
```scala
388388
val i = 4
389389

390-
val num = i match
390+
val code = i match
391391
case 0 => "00"
392392
case 1 => "01"
393393
case what => s"You gave me: $what"
394394

395-
println(num)
395+
println(code)
396396
```
397397

398398
In this example the variable is named `what` to show that it can be given any legal name.

0 commit comments

Comments
 (0)