DEV Community

Discussion on: Write a script to find "Perfect Numbers"

Collapse
 
antonrich profile image
Anton

A very minor tweak. i-1 doesn't require parentheses in this case.

divisorsList i = 
    [ x | x <- [1..i-1], i `mod` x == 0]