The reduceLeft method takes an associative binary operator function as parameter and will use it to collapse elements from the collection. The order for traversing the elements in the collection is from left to right and hence the name reduceLeft. Unlike the foldLeft method, reduceLeft does not allow you to also specify an initial value.
As per the Scala documentation, the definition of the reduceLeft method is as follows:
def reduceLeft[B >: A](op: (B, A) ⇒ B): B
The reduce operation takes all the elements in a collection and combines them in some way to produce a single value. It uses a binary operation to combine the first two values. Then, it takes the result of that first combination and combines it with the next element in the collection, and then the next, and so on through the end of the collection.
The code looks like this: