Reductions is an addition to Enumerable that returns an array containing all of the intermediate values that would be generated in a call to Enumerable#reduce. (5..10).reductions(:+) # => [5, 11, 18, 26, 35, 45]
Required Ruby Version
>= 0
Authors
Penn Taylor
Versions
- 0.1.0 March 14, 2015 (7.5 KB)