4 ms·
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(:+)
by dan-k 13y 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(:+)