There is only a subtle difference between reduce and fold. Fold requires an initial value, whereas reduce doesn’t need one. Reduce example: scala> (1 to 10).reduce(_ * _) val res0: Int = 3628800 Fold example: scala> (1 to 10).fold(0)(_ * _) val res0:...
blog.zimo.li1 min readNo responses yet.