Why do monads not compose in scala

前端 未结 2 1209
清歌不尽
清歌不尽 2020-12-15 06:16

Why do monads not compose when a Monad is an Applicative and an Applicative is a Functor. You see this inheritance chain in many articles on the web ( Which i have gone thro

2条回答
  •  情话喂你
    2020-12-15 06:55

    Tony Morris gave a talk on monad transformers that explains this precise issue very well.

    http://tonymorris.github.io/blog/posts/monad-transformers/

    He uses haskell, but the examples are easily translatable to scala.

提交回复
热议问题