Calculation of difference between consecutive elements in list of integers.