reduceOption

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

reduceOption applies the binary operator op to pairs of elements in this collection until the final result is calculated and returned wrapped with Some.

On empty collections this function returns None.