3 ms·
Monads are just another functional programming idiom, defined by two regular functions, `return` and `(>>=)`. But in terms of I/O with the outside world, monad
by Silhouette 10y ago
Monads are just another functional programming idiom, defined by two regular functions, `return` and `(>>=)`.
But in terms of I/O with the outside world, monadic patterns become useful in Haskell because the type of your main function is also `IO ()`. That's the "escape hatch", not the use of monads in itself.