Skip to content

Commit

Permalink
This is probably safer.
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondtay committed Oct 29, 2017
1 parent 6a70cea commit 517dcea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/data/Cokleisli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final case class Cokleisli[F[_], A, B](run: F[A] => B) { self =>
* {{{
* scala> import cats._, data._
* scala> val f = Cokleisli((xs: NonEmptyList[Int]) => xs.reverse.head)
* scala> def before(x: String) = x.toInt
* scala> def before(x: Double) = x.toInt
* scala> def after(x: Int) = x.toString
* scala> f.dimap(before)(after).run(NonEmptyList.of("1","2"))
* res0: String = 2
Expand All @@ -30,7 +30,7 @@ final case class Cokleisli[F[_], A, B](run: F[A] => B) { self =>
* {{{
* scala> import cats._, data._, implicits._
* scala> val f = Cokleisli((xs: NonEmptyList[Int]) => xs.reverse.head)
* scala> def before(x: String) = x.toInt
* scala> def before(x: Double) = x.toInt
* scala> def after(x: Int) = x.toString
* scala> f.lmap(before).rmap(after).run(NonEmptyList.of("1","2"))
* res0: String = 2
Expand Down

0 comments on commit 517dcea

Please sign in to comment.