diff --git a/core/src/main/scala/cats/instances/option.scala b/core/src/main/scala/cats/instances/option.scala index 315b91f942..0b3db11d05 100644 --- a/core/src/main/scala/cats/instances/option.scala +++ b/core/src/main/scala/cats/instances/option.scala @@ -284,6 +284,13 @@ private[instances] trait OptionInstancesBinCompat0 { case None => G.pure(Option.empty[A]) case Some(a) => G.map(f(a))(b => if (b) Some(a) else None) } + + override def mapAccumulateFilter[S, A, B](init: S, fa: Option[A])(f: (S, A) => (S, Option[B])): (S, Option[B]) = { + fa match { + case Some(a) => f(init, a) + case None => (init, None) + } + } } }