[reactive] To fmap fmap or not?
bugfact at gmail.com
Tue Nov 18 18:54:14 EST 2008
Many of the fmap fmaps I've seen come from
(fmap f) . g = (fmap f) `fmap` g = fmap (fmap f) g = (fmap (fmap f)) g =
((fmap.fmap) f) g = (fmap.fmap) f g
But... to me the former is much clearer than the latter... It is less
abstract since it uses (.) instead of fmap.
However, I also see (fmap.fmap.fmap), so Conal must have seen a pattern
Of course one could also write (fmap `fmap` fmap `fmap` fmap) instead of
Or as was already mentioned with the generic replacement (.) = fmap,
(fmap.fmap.fmap) can be written as ( (.) . (.) . (.) )
But besides this all being very Haskelly Hackery - and maybe ASCII art that
needs to be censured - I don't see the light yet :)
Could somebody enlighten me?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Reactive