Skip to content

Commit a94447c

Browse files
authored
Merge pull request #1056 from XD-DENG/patch-1
Use println() rather than print()
2 parents 07e07fe + e7f231f commit a94447c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_tour/for-comprehensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def foo(n: Int, v: Int) =
4242
4343
foo(10, 10) foreach {
4444
case (i, j) =>
45-
print(s"($i, $j) ") // prints (1, 9) (2, 8) (3, 7) (4, 6) (5, 5)
45+
println(s"($i, $j) ") // prints (1, 9) (2, 8) (3, 7) (4, 6) (5, 5)
4646
}
4747
4848
```
@@ -60,7 +60,7 @@ You can omit `yield` in a comprehension. In that case, comprehension will return
6060
def foo(n: Int, v: Int) =
6161
for (i <- 0 until n;
6262
j <- i until n if i + j == v)
63-
print(s"($i, $j)")
63+
println(s"($i, $j)")
6464
6565
foo(10, 10)
6666
```

0 commit comments

Comments
 (0)