Interesting, assumed that something like the following:
sc.parallelize([1, 2, 3, 4]).foreach(lambda x: accum.add(x))
As per the Spark manual would execute in parallel in Spark, applying a function to each element. But perhaps that is not quite what the above line is doing.