[reactive] To fmap fmap or not?
camior at gmail.com
Wed Nov 19 10:34:29 EST 2008
In my blog I wrote comment with a pretty short explanation. (BTW, I
love the box penetration metaphor).
2008/11/18 Peter Verswyvelen <bugfact at gmail.com>:
> 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?
More information about the Reactive