Skip to content

Commit

Permalink
Change comment on composition of Monads
Browse files Browse the repository at this point in the history
  • Loading branch information
yilinwei committed Jun 16, 2016
1 parent 1aa938b commit 43ccc3f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main/scala/catslib/Monad.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,12 @@ object MonadSection extends FlatSpec with Matchers with exercise.Section {

/** = Composition =
*
* Unlike `Functor`s and `Applicative`s
* not all `Monad`s compose. This means that even if `M[_]` and `N[_]` are
* both `Monad`s, `M[N[_]]` is not guaranteed to be a `Monad`.
*
* However, many common cases do. One way of expressing this is to provide
* instructions on how to compose any outer monad (`F` in the following
* example) with a specific inner monad (`Option` in the following
* example).
* Unlike `Functor`s and `Applicative`s, you cannot derive a Monad instance for a generic `M[N[_]]`
* where both `M[_]` and `N[_]` are Monads.
*
* However, it is common to want to compose the effects of both `M[_]` and `N[_]`. One way of expressing this
* is to provide instructions on how to compose any outer monad (`F` in the following example) with a specific
* inner monad (`Option` in the following example).
*
* {{{
* case class OptionT[F[_], A](value: F[Option[A]])
Expand Down

0 comments on commit 43ccc3f

Please sign in to comment.