Monad Transformers is an important pattern of purely functional programming that allows us to combine effect types. Let's now discuss it in detail.
Monad Transformers
The specialization of effect types
We've discussed how effect types are ubiquitous in purely functional programming and are used in order to abstract away side effects. You may have also noticed that these types are highly specialized, which means we have almost one-to-one mapping between side effects and effect types. For example, the ability of an application to return null is represented by an Option side effect type. Option is good for such null situations. However, it does not perform well when tasked with modeling errors and exceptions. This...