That will work in the special case of lists, but there are all sorts of other things you might want to map across.

On Sat, Feb 27, 2016 at 7:24 PM, Rustom Mody <rustompmody@gmail.com> wrote:


On Sun, Feb 28, 2016 at 2:26 AM, Jeffrey Brown <jeffbrown.the@gmail.com> wrote:
It is, I agree, not appropriate everywhere, but point-free code can in the right place be much more readable. Maps are a good example. Compare:

    map (f . g . h) xs

to

    map (\x -> f $ g $ h x) xs

Not quite a fair comparison
How about?
[ f (g (h x))  |  x <- xs ]



_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners




--
Jeffrey Benjamin Brown