Hacker News new | past | comments | ask | show | jobs | submit login

I don't know. To me,

    sum $ map (^2)
Is pretty clear as a sum of squares is a quite common mathematical idiom. The zipWith part could probably be avoided.

   guard $ (6 ==) $
     sum $ map (^2)
       [(a%k),...]



I think the original is still a lot cleaner, though.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: