2 ms·
> it only depends on having some IO type for "IO actions" or "IO procedures" or whatever you want to call them. It needs some IO type that you can put stuff in
by marcosdumay 8y ago
> it only depends on having some IO type for "IO actions" or "IO procedures" or whatever you want to call them.
It needs some IO type that you can put stuff in it; when that stuff is functions you need some way from passing previous results as arguments of the next ones; also, you need some way to compose that stuff in a defined order.
You do those, and you have a monad. Other languages do not work without monads, they just get a single IO monad that everything is implicitly inside. Their programmers can afford not to say "monad" because they only get one to choose, and can't choose not to take it either.