3 ms·
Much clearer. I slightly prefer the following though: ((print . sum . map read . lines) <=< readFile) "somefile.txt"
by tome 14y ago
Much clearer. I slightly prefer the following though:
((print . sum . map read . lines) <=< readFile) "somefile.txt"
- evincarofautumn 14y agoPointfree makes more sense for a definition, I think: sumFileLines = print . sum . map read . lines <=< readFile Less so inline because of the excessive parentheses or ($).