This is a continuation of my old questions :
I know that monads are not compound, i.e. if M1[_]they M2[_]are monads M2[M1[_]], they are not necessarily monads . For example, List[Int]they Option[Int]are monads, but Option[List[Int]]it is not automatically a monad, so I need to monad transformeruse it as a monad (as in here )
I know that applicative functors are compound. I think this means that if A1[_]they A2[_]are applicative, then A2[A1[_]]it is always applicative. Is it correct?
Could you give an example of such a composition when A1there is Listalso A2is Option? Could you give an example of other appeals made?
source
share