Why does Haskell not have an I Monad (for input only, unlike the IO monad)?
问题 Conceptually, it seems that a computation that performs output is very different from one that performs input only. The latter is, in one sense, much purer. I, for one, would like to have a way to separate the input only parts of my programme from the ones that might actually write something out. So, why is there no input only Monad? Any reason why it wouldn't work to have an I monad (and an O Monad, which could be combined into the IO Monad)? Edit : I mostly meant input as reading files, not