Skip to content

Commit

Permalink
override prependK/appendK for ComposedAlternative
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed Oct 25, 2021
1 parent 6234c26 commit 65aa007
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/scala/cats/Composed.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ private[cats] trait ComposedAlternative[F[_], G[_]]
with ComposedApplicative[F, G]
with ComposedMonoidK[F, G] { outer =>
def F: Alternative[F]

override def prependK[A](a: A, fa: F[G[A]]): F[G[A]] = F.prependK(G.pure(a), fa)

override def appendK[A](fa: F[G[A]], a: A): F[G[A]] = F.appendK(fa, G.pure(a))
}

private[cats] trait ComposedFoldable[F[_], G[_]] extends Foldable[λ[α => F[G[α]]]] { outer =>
Expand Down

0 comments on commit 65aa007

Please sign in to comment.