2 ms·
Using an IO monad first is putting the cart before the horse, unless your business problem is fundamentally about IO. If you want to be able to express the busi
by lmm 6y ago
Using an IO monad first is putting the cart before the horse, unless your business problem is fundamentally about IO. If you want to be able to express the business logic as functions then you need to use monads to encapsulate the complex parts of the implementation (or you'll end up with an ad-hoc, informally specified, bug ridden implementation of half of them), and once you're comfortable with them you'll probably find them useful for giving you explicit-but-not-too-verbose control over IO as well.