Skip to content

Commit b89c074

Browse files
authored
Fix postfix operations (#2949)
1 parent 65b6c50 commit b89c074

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_overviews/parallel-collections/concrete-parallel-collections.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ is an ordered sequence of elements equally spaced apart. A parallel range is
8484
created in a similar way as the sequential
8585
[Range](https://www.scala-lang.org/api/{{ site.scala-212-version }}/scala/collection/immutable/Range.html):
8686

87-
scala> 1 to 3 par
87+
scala> (1 to 3).par
8888
res0: scala.collection.parallel.immutable.ParRange = ParRange(1, 2, 3)
8989

90-
scala> 15 to 5 by -2 par
90+
scala> (15 to 5 by -2).par
9191
res1: scala.collection.parallel.immutable.ParRange = ParRange(15, 13, 11, 9, 7, 5)
9292

9393
Just as sequential ranges have no builders, parallel ranges have no
@@ -146,7 +146,7 @@ and
146146
scala> val phs = scala.collection.parallel.immutable.ParHashSet(1 until 1000: _*)
147147
phs: scala.collection.parallel.immutable.ParHashSet[Int] = ParSet(645, 892, 69, 809, 629, 365, 138, 760, 101, 479,...
148148

149-
scala> phs map { x => x * x } sum
149+
scala> phs.map(x => x * x).sum
150150
res0: Int = 332833500
151151

152152
Similar to parallel hash tables, parallel hash trie

0 commit comments

Comments
 (0)