This repository was archived by the owner on Nov 29, 2020. It is now read-only.
This repository was archived by the owner on Nov 29, 2020. It is now read-only.
Pattern match optimization. #43
Open
Description
In scalaz/scalaz#1958 @fommil uses this optimization:
fa match {
case Right(b) => f(b)
case Left(a) => Left(a)
}
fa match {
case Right(b) => f(b)
case a => a.asInstanceOf[Either[L, B]]
}
perhaps we could detect this particular case and optimize it automatically.