3 ms·
I just like point-free style because it leaves me with fewer things to name, and fewer choices to make. Placeholder names like "xs" are just noise. The "x" ha
by mbrubeck 17y ago
I just like point-free style because it leaves me with fewer things to name, and fewer choices to make. Placeholder names like "xs" are just noise. The "x" has no meaning here:
double x = 2*x
So I'd rather write it like this:
double = (2*)
Similarly, there's no need to introduce an arbitrary name like "input" or "numbers" for this function (part of a Project Euler solution):
highestProduct = maximum . map product . concat . map (groupsOf 4)