Relationship between Functor, Applicative Functor, and Monad

后端 未结 2 645
心在旅途
心在旅途 2021-02-05 02:09

When reading up on type classes I have seen that the relationship between Functors, Applicative Functors, and Monads is that of strictly increasing power. Functors are types tha

2条回答
  •  失恋的感觉
    2021-02-05 02:35

    Changing the definition of Monad at this point, would have broken a lot of existing code (any piece of code that defines a Monad instance) to be worthwhile.

    Breaking backwards-compatibility like that is only worthwhile if there is a large practical benefit to the change. In this case the benefit is not that big (and mostly theoretical anyway) and wouldn't justify that amount of breakage.

提交回复
热议问题