Skip to content

Commit

Permalink
map+block -> map+proc
Browse files Browse the repository at this point in the history
  • Loading branch information
nomnel committed Feb 25, 2013
1 parent ed3b310 commit dec0490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 020.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ def factorial(n)
n.downto(1).inject(:*)
end

factorial(100).to_s.split("").map{|s| s.to_i}.inject(:+)
factorial(100).to_s.split("").map(&:to_i).inject(:+)
end

0 comments on commit dec0490

Please sign in to comment.