Permalink
Browse files

cleanup

  • Loading branch information...
1 parent b6c5456 commit 337a67ff2403eb1c9bbd803e2fdc06d154420960 @bdoll bdoll committed Sep 19, 2008
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/greatest_common_factor.rb
@@ -50,11 +50,7 @@ def all_ints?(collection)
# Find all factors for each element in the array
def find_factor_sets(collection)
- factor_sets = []
- collection.each do |n|
- factor_sets << find_all_factors(n)
- end
- factor_sets
+ collection.collect { |n| find_all_factors(n) }
end
# Brute force approach to finding all factors for an integer

0 comments on commit 337a67f

Please sign in to comment.