Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Much clearer. I slightly prefer the following though:

    ((print . sum . map read . lines) <=< readFile) "somefile.txt"


Pointfree makes more sense for a definition, I think:

    sumFileLines = print . sum . map read . lines <=< readFile
Less so inline because of the excessive parentheses or ($).


There should be one-- and preferably only one --obvious way to do it.


Right, I actually agree and think your version is best!


Nice. I like this version!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: