Skip to content

Commit

Permalink
Merge pull request #635 from ceedubs/rm-kleisli-lmap
Browse files Browse the repository at this point in the history
Remove Kleisli.lmap
  • Loading branch information
adelbertc committed Nov 15, 2015
2 parents ff359d7 + 12e16e0 commit 5db0f44
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/src/main/scala/cats/data/Kleisli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ final case class Kleisli[F[_], A, B](run: A => F[B]) { self =>
def dimap[C, D](f: C => A)(g: B => D)(implicit F: Functor[F]): Kleisli[F, C, D] =
Kleisli(c => F.map(run(f(c)))(g))

def lmap[C](f: C => A): Kleisli[F, C, B] =
Kleisli(run compose f)

def map[C](f: B => C)(implicit F: Functor[F]): Kleisli[F, A, C] =
Kleisli(a => F.map(run(a))(f))

Expand Down Expand Up @@ -118,7 +115,7 @@ private[data] sealed abstract class KleisliInstances extends KleisliInstances0 {
implicit def kleisliContravariant[F[_], C]: Contravariant[Kleisli[F, ?, C]] =
new Contravariant[Kleisli[F, ?, C]] {
override def contramap[A, B](fa: Kleisli[F, A, C])(f: (B) => A): Kleisli[F, B, C] =
fa.lmap(f)
fa.local(f)
}
}

Expand Down Expand Up @@ -218,7 +215,7 @@ private trait KleisliStrong[F[_]] extends Strong[Kleisli[F, ?, ?]] {
implicit def F: Functor[F]

override def lmap[A, B, C](fab: Kleisli[F, A, B])(f: C => A): Kleisli[F, C, B] =
fab.lmap(f)
fab.local(f)

override def rmap[A, B, C](fab: Kleisli[F, A, B])(f: B => C): Kleisli[F, A, C] =
fab.map(f)
Expand Down

0 comments on commit 5db0f44

Please sign in to comment.