
2 May
2011
2 May
'11
9:56 p.m.
i came across hlint today and ran it on my experiments. It pointed out places where I was overly cautious with parens or used a $ and forget to remove it later. But one suggestion it made I was curious about. Why does it recommend using fmap over >>=? Idiomatically does fmap make more sense when the Monad is more like a collection? For instance I had "(applyOp op x y) >>= (flip (:) ds)". This seems more clear than "fmap ((:) ds) (applyOp op x y)".