4 ms·
Ah! But should it be written like that?
by conistonwater 10y ago
Ah! But should it be written like that?
- wz1000 10y agoI 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),...]
- conistonwater 10y agoI think the original is still a lot cleaner, though.