Simplest non-trivial monad transformer example for “dummies”, IO+Maybe
问题 Could someone give a super simple (few lines) monad transformer example, which is non-trivial (i.e. not using the Identity monad - that I understand). For example, how would someone create a monad that does IO and can handle failure (Maybe)? What would be the simplest example that would demonstrate this? I have skimmed through a few monad transformer tutorials and they all seem to use State Monad or Parsers or something complicated (for a newbee). I would like to see something simpler than