2 ms·
By no means. There's this idea floating around that monads are things that had to be "introduced" into Haskell to "solve" certain problems with purity. This i
by tome 9y ago
By no means.
There's this idea floating around that monads are things that had to be "introduced" into Haskell to "solve" certain problems with purity. This idea is false. Furthermore this question misses half the point of monads, that is, that you can program generically over them. Sure, that one example makes the IO monad look just like code in any other imperative language. But I can also use do notation and monad combinators with lists, coroutines, promises, futures, ASTs, and indeed any other monad I care to come up with. It may seem that any individual monad qua monad is a waste of time but when taken in totality it is a completely different question.
Since the question mentioned no other monad than IO it doesn't begin to address the important issues.