3 ms·
People talk a lot about the IO monad because it's one of the most complex monads in general use (and referred to as a monad by a major language and a lot of dev
by WorldMaker 7y ago
People talk a lot about the IO monad because it's one of the most complex monads in general use (and referred to as a monad by a major language and a lot of developers; there are a lot of things that can be considered monads, follow the monad laws, but no one bothers calling them monads).
Monads don't have anything to do with IO or avoiding side effects, they are about composing/combining operations. At heart, the monad laws basically state that if you have two puzzle pieces with similar edges you can snap them together and start thinking about them as a larger puzzle piece in the same puzzle, and that eventually when you are done snapping together pieces you can admire whatever image they form as a result.
The fact that people talk a lot about the IO Monad in Haskell was that it was a jigsaw puzzle that solved a lot of problems in early Haskell, and led to a lot of exploration in monads.