Re:Monads Explained Quickly
by aninhumer on Saturday April 09, 2016 @08:14AM
(#11460951)
The benefit is that, by recognising a common pattern of composition among many different types, you can develop a whole suite of functions that work with anything that follows that composition pattern.
This means you can encounter an unfamiliar monadic type, and form a decent intuition for what it does based on its purpose (although obviously you should probably check). Then you can encounter a weird new data structure, and immediately start mapping monadic functions over it without learning anything about its internals.
Also, a lot of monads make it more convenient to deal with certain things more strictly (IO, checking Maybes, avoiding mutable state etc.) such that you actually do them, instead of thinking they're too much faff.
This means you can encounter an unfamiliar monadic type, and form a decent intuition for what it does based on its purpose (although obviously you should probably check). Then you can encounter a weird new data structure, and immediately start mapping monadic functions over it without learning anything about its internals.
Also, a lot of monads make it more convenient to deal with certain things more strictly (IO, checking Maybes, avoiding mutable state etc.) such that you actually do them, instead of thinking they're too much faff.