title: How does the fold action work in Spark?
body: <p>Below I have a Scala example of a Spark <code>fold</code> action:</p>
  
  <pre><code>val rdd1 = sc.parallelize(List(1,2,3,4,5), 3)
  rdd1.fold(5)(_ + _)
  </code></pre>
  
  <p>This produces the output <code>35</code>. Can somebody explain in detail how this output gets computed?</p>