Let's take the simple case here (pseudo code)
def readnonfp(): String = {
nonMonadicIO.readFile("somefile")
}
def readfp(): IO[String] = {
monadicIO.readFile("somefile")
}
Now this will be maybe composed like this
length(readnonfp())
readnonfp >>= length
What exactly is the difference between the two ? What is IO monad good at than it's counterpart way of doing IO?