From be6165d59b9a6f71cccb8b256cb78c503aacb260 Mon Sep 17 00:00:00 2001 From: Chris Fuller Date: Thu, 7 Jan 2016 14:40:28 -0600 Subject: [PATCH] Shrank range in fold/sum example to correct overflow error. --- overviews/parallel-collections/overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overviews/parallel-collections/overview.md b/overviews/parallel-collections/overview.md index 441fc04f0f..307fe47677 100644 --- a/overviews/parallel-collections/overview.md +++ b/overviews/parallel-collections/overview.md @@ -95,11 +95,11 @@ Using a parallel `map` to transform a collection of `String` to all-uppercase: Summing via `fold` on a `ParArray`: - scala> val parArray = (1 to 1000000).toArray.par + scala> val parArray = (1 to 10000).toArray.par parArray: scala.collection.parallel.mutable.ParArray[Int] = ParArray(1, 2, 3, ... scala> parArray.fold(0)(_ + _) - res0: Int = 1784293664 + res0: Int = 50005000 #### filter