Clarifying contravariance nature of the return type of a function as parameter a function of an outer convariant container
问题 In Option we have def getOrElse[B >: A](default: => B): B = this match { case None => default case Some(a) => a } def orElse[B >: A](obj: => Option[B]): Option[B] = this match { case None => obj case _ => this } In Either we have: def flatMap[EE >: E, B](f: A => Either[EE, B]): Either[EE, B] I understand what is going and why, a rather extended example could be this OrElse( { Option[B]}).map{....} If B is such that A :> B, then if Some(a) you get Some(a).map(f:B => ???) then Kaboom generally