Hacker News new | ask | show | jobs
by dan-k 4818 days ago
With reduce you don't even need to use the & notation, it has that syntactic sugar built in, so you can just do this:

[1, 2, 3, 4, 5].reduce(:+)