AndyKelley 17 hours ago

It's not a monad because it doesn't return a description of how to carry out I/O that is performed by a separate system; it does the I/O inside the function before returning. That's a regular old interface, not a monad.

  • endgame 17 hours ago

    So it's the reader monad, then? ;-)

    • [removed] 16 hours ago
      [deleted]
    • tylerhou 14 hours ago

      Yes.

      • AndyKelley 12 hours ago

        Can you explain for those of us less familiar with Haskell (and monads in general)?

throwawaymaths 10 hours ago

i mean not really? it absolutely does nothing to segregate stateful impurity into a type theoretically stateless token