reduce

trait Collection[A] {
  def reduce(op: (A, A) => A): A
}

reduce applies the binary operator op to pairs of elements in this collection until the final result is calculated.

On empty collections this function throws an UnsupportedOperationException exception.