There's a warm discuss in post Write a script to find "Perfect Numbers" . Here's my solutions.
Ruby
def sum_divisions(n)
(1...n).select{|i| n ...
For further actions, you may consider blocking this person and/or reporting abuse
In rust, there 2 idiomatic way to do the main()
Your version is idiomatic, but there also this way:
For something simple like this, I would use this version
This is like Ruby, nice.
In the Clojure example, you can move the if into :when clojuredocs.org/clojure.core/doseq...
thanks, that's better.