On Sun, Jul 25, 2010 at 4:13 PM, aditya siram <[email protected]> wrote: > Eta-reducing is nice, and sometimes it makes code more readable. But 'flip' > is one of those functions that always seems to hinder rather than help > readability, conversely factoring out flip always makes code easier to > comprehend. I don't see a need for its existence - maybe I'm missing > something and more experienced Haskellers can comment. >
I'm a fan of (flip map), (flip mapM) and the like. These are usually renamed 'for' and 'forM' (and then 'forM_', of course). It makes for nice in-line function literals: > flip map xs $ \elem -> > do something long and complex > with xs Antoine _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
