August 2018
Intermediate to advanced
380 pages
10h 2m
English
The Free Monad pattern is a stronger version of the Tagless Final pattern. Actually, the free object is a structure from abstract algebra. Hence the name comes from this domain.
The application of the pattern is rather limited, and most likely we will not encounter any real necessity for the pattern while only starting purely functional programming. So we will not go in depth about the Free Monad here. However, we will describe in general how it works.
Basically, the idea behind the Free Monad is that all of our computations become a value. The idea is that whenever we define our application, it does not really execute itself, but constructs an abstract syntax tree that describes the application that we can run later. And it is ...