6 ms·
He actually does go into that in the "Some side notes" part. He recommends calling it a monad only when you actually use the monadic interface: “I have to dire
by djipko 12y ago
He actually does go into that in the "Some side notes" part. He recommends calling it a monad only when you actually use the monadic interface:
“I have to directly use the result of one IO action in order to decide which IO action should happen next”: Yes, this is a use case for IO’s monadic interface."
Then yes - you need the do-notation.
For simple sequencing he recommends to use it's Applicative instance.
Your overall point is correct though - choosing to avoid the do notation in Haskell will likely limit your ability to read and understand a lot of code just because monads are so commonplace in Haskell.