If you order all concepts in prison programming by the product of usefulness and confusion it must be somewhere at the very top.
If you order all concepts in prison programming by the product of usefulness and confusion it must be somewhere at the very top.
I'm not sure why it's different than other programming concepts in this way... maybe just because it's such an abstract concept where most people have no frame of reference. You don't appreciate it until you've used it in a bunch of different contexts and finally see why this one abstraction works for all of them
If you really want to, you can use the language of category theory to talk about monads in Haskell. Some people seem to get a great deal of satisfaction out of doing so (and I suppose that it's harmless fun). But it does build up a certain undeserved mystique around monads in Haskell.
It's just that on other paradigms interpreters are a very advanced and completely optional topic. While on pure FP they are fundamental.
If you could share some of these examples, or perhaps a link to those examples, I'd greatly appreciate it.
Though I’m not the best at explaining things, hopefully it makes sense.
Sorry if I misunderstood. I've been reading many explanations for monads, but insight seem to elude me.
For example, mapping some function over a Result type that may or may not have a value in an iterative manner would make me check for the existence of the value, unpack, and apply function. If we have a Monad abstraction then I can just map my function which will be applied in case of a result, or the whole thing will remain None - it is safe either way. And one other useful part is the uniformity of functions working on monads - I can use the same ones for a List, Result, or any similar container, IO, State monads and even Async is a monad.