quchen/articles

AMP: Use <$> instead of `fmap`

andreasabel opened this issue · 1 comments

Very good proposal!

In "Outline of new code", implementations of <* and *>, use <$> instead of fmap for better readability.

Personally, I would also prefer

m >>= f = join (f <$> m)

over

m >>= f = join (fmap f m)

but that's up to debate.

I used fmap here so the definitions are more self-contained, but in Applicative style <$> may be better. I'll update it in the next revision. (Luckily, this isn't the primary hurdle for the proposal) :-)