Free Monad: Discussion on when to use it, maybe you are using it already but don't know it!
Free Monads are popular these days but they are still not in widespread use primarily because of their syntatic complexity and high abstraction level. Free monads allow you to operate in monadic structures with "commands" or "instructions" that mimic imperative programs. Imperative programming is fairly easy as each instruction is sequenced and tracing the flow of logic is mostly easy. However, in reactive programming for example web programming that involves "callbacks", it is much harder to trace the time-based sequencing because callbacks can be called at any time. This is especially true in high-latency enviroments such as the internet. If we skip the concept of free monads for a moment, we see that no matter where we look, when we program in a complex enviroment like the internet, we often create Domain Specific Languages to deal with the complexity. In both c# and scala, as well as javascript to some degree, the concepts of async/await have been i...