orElse

trait PartialFunction[X, Y] {
  def orElse(g: PartialFunction[X, Y]): PartialFunction[X, Y]
}

orElse creates an anonymous partial function that returns the value this partial function does.

For those input values for which this partial function is not defined, the anonymous partial function returns the value returned by g.

If neither this function or g are defined for the input value, the anonymous function throws a MatchError exception.