I\'ve read this article, but didn\'t understand last section.
The author says that Monad gives us context sensitivity, but it\'s possible to achieve the same result
Now that ApplicativeDo
extension become pretty common thing, the difference between Monad
and Applicative
can be illustrated using simple code snippet.
With Monad
you can do
do
r1 <- act1
if r1
then act2
else act3
but having only Applicative
do-block, you can't use if
on things you've pulled out with <-
.