News for hackers. Stuff that matters.
Re:I'm Sick of This by Locke on Wednesday April 08, 2009 @12:06PM (#552889)
Usually, I think, people write sum with inject:

    [1,2,3].inject { |s,i| s + i }
Which is presumably why sum doesn't exist.
Re:I'm Sick of This by nc on Wednesday April 08, 2009 @01:01PM (#552995)
Which is even easier in Ruby 1.9

[1,2,3].inject(:+)