Effective Haskell: Consider adding explanation (p 166, pdf, B1.0)

In the example:

return "4" >>= ioRead

You could consider adding an explanation, like “Remember that return "4" returns an IO String, >>= unwraps that and passes the string value to ioRead, which reads the string and returns an IO Int.”

It may just be me getting confused, but I had to think it over twice to see it.

1 Like