August 2018
Intermediate to advanced
380 pages
10h 2m
English
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 is because it does not preserve the information of the nature of the failure.
A data type that is good for modeling erroneous computation that can fail is Either. However, if you try to model a ...
Read now
Unlock full access