progress_population = [115, 120, 118, 127] => [0, 115, 120, 118, 127] => [0, 115, 120, 118] [115, 120, 118, 127] - [0, 115, 120, 118]
- progress_population = [115, 120, 118, 127]
- unshifted_progress_population = progress_population.clone.unshift(0)
- unshifted_progress_population.pop
- p progress_population.zip(unshifted_progress_population).map{|comparison| comparison[0].to_i - comparison[1].to_i}.flatten
- => [115, 5, -2, 9]
...もっといい書き方ないかな。