
In my blog I wrote comment with a pretty short explanation. (BTW, I
love the box penetration metaphor).
http://netsuperbrain.com/blog/posts/introducing-reactive-events/
David
2008/11/18 Peter Verswyvelen
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 here? Of course one could also write (fmap `fmap` fmap `fmap` fmap) instead of (fmap.fmap.fmap). 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?
-- David Sankel Sankel Software