News for hackers. Stuff that matters.
Re:IO Monad Considered Harmful by exDM69 on Friday January 23, 2015 @04:52AM (#8934093)
That's a bit hard to read, isn't it? (return . f) is a common idiom (or antipattern?) which is better solved by using fmap. hlint will tell you this. For example:

    fmap ("Hello, " ++) getLine >>= putStrLn
This isn't necessarily better either, I'd write this using do-notation.

I understood every bit of that code, I just think it's ugly and hard to read and there are better ways to get the same done.

There are no comments on this comment yet.