Difference between fold and reduce revisted
问题 I've been reading a nice answer to Difference between reduce and foldLeft/fold in functional programming (particularly Scala and Scala APIs)? provided by samthebest and I am not sure if I understand all the details: According to the answer ( reduce vs foldLeft ): A big big difference (...) is that reduce should be given a commutative monoid, (...) This distinction is very important for Big Data / MPP / distributed computing, and the entire reason why reduce even exists. and Reduce is defined