Skip to content

Commit

Permalink
Merge pull request #1304 from kcsongor/master
Browse files Browse the repository at this point in the history
Remove references to Monad from CoflatMap doc
  • Loading branch information
non authored Aug 22, 2016
2 parents 2f5f93a + 5fe4837 commit 79d5f53
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/src/main/scala/cats/CoflatMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ import simulacrum.typeclass

/**
* `coflatMap` is the dual of `flatMap` on `FlatMap`. It applies
* a value in a Monadic context to a function that takes a value
* a value in a context to a function that takes a value
* in a context and returns a normal value.
*
* Example:
* {{{
* scala> import cats.implicits._
* scala> import cats.Monad
* scala> import cats.CoflatMap
* scala> val fa = Monad[Option].pure(3)
* scala> val fa = Some(3)
* scala> def f(a: Option[Int]): Int = a match {
* | case Some(x) => 2 * x
* | case None => 0 }
Expand All @@ -36,9 +35,8 @@ import simulacrum.typeclass
* Example:
* {{{
* scala> import cats.implicits._
* scala> import cats.Monad
* scala> import cats.CoflatMap
* scala> val fa = Monad[Option].pure(3)
* scala> val fa = Some(3)
* fa: Option[Int] = Some(3)
* scala> CoflatMap[Option].coflatten(fa)
* res0: Option[Option[Int]] = Some(Some(3))
Expand Down

0 comments on commit 79d5f53

Please sign in to comment.