Skip to content

Commit

Permalink
override prependK/appendK for Tuple2K
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed Oct 26, 2021
1 parent 6af39c9 commit 3c3fd1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/scala/cats/data/Tuple2K.scala
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ sealed private[data] trait Tuple2KAlternative[F[_], G[_]]
with Tuple2KMonoidK[F, G] {
def F: Alternative[F]
def G: Alternative[G]

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

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

sealed private[data] trait Tuple2KMonad[F[_], G[_]]
Expand Down

0 comments on commit 3c3fd1c

Please sign in to comment.