aboutsummaryrefslogtreecommitdiff
path: root/docs/scala-programming-guide.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/scala-programming-guide.md')
-rw-r--r--docs/scala-programming-guide.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/scala-programming-guide.md b/docs/scala-programming-guide.md
index 56d2a3a4a0..1064dae7ae 100644
--- a/docs/scala-programming-guide.md
+++ b/docs/scala-programming-guide.md
@@ -349,7 +349,7 @@ An accumulator is created from an initial value `v` by calling `SparkContext.acc
The interpreter session below shows an accumulator being used to add up the elements of an array:
{% highlight scala %}
-scala> val accum = sc.accumulator(0)
+scala> var accum = sc.accumulator(0)
accum: spark.Accumulator[Int] = 0
scala> sc.parallelize(Array(1, 2, 3, 4)).foreach(x => accum += x)