Hacker News new | ask | show | jobs
by mapM 1036 days ago
You can use monads to track where effects are used, and scope them. This allows you to write pure functions that uses effects in their implementation, but the users of the function need not worry about that.

Some monads are also handy for structuring certain kind of code---for example, the non-determinism monad can be handy for writing searches, etc.