Skip to content

Commit

Permalink
Revert incorrect change
Browse files Browse the repository at this point in the history
  • Loading branch information
bplommer committed May 29, 2022
1 parent 9dcdb1c commit 81ff10c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/src/main/scala/cats/data/Kleisli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ final case class Kleisli[F[_], -A, B](run: A => F[B]) { self =>
* }}}
*/
def andThen[C](k: Kleisli[F, B, C])(implicit F: FlatMap[F]): Kleisli[F, A, C] =
k.run match {
case _: StrictConstFunction1[_] => k.asInstanceOf[Kleisli[F, A, C]]
case _ => this.andThen(k.run)
}
this.andThen(k.run)

def compose[Z, AA <: A](f: Z => F[AA])(implicit F: FlatMap[F]): Kleisli[F, Z, B] =
Kleisli.shift((z: Z) => F.flatMap(f(z))(run))
Expand Down

0 comments on commit 81ff10c

Please sign in to comment.