The difference list of a list of integers is the list differences of consecutive members.
For example the difference list of
1, 3, 2 ,4
is
2, -1, 2
Your task is to take as input a difference list and output what the difference list would look like if the original list were sorted.
For example the difference list
2, 1, -2, -1
Might represent a list
2 4 5 3 2
Which when sorted is
2 2 3 4 5
Which has a difference list of
0 1 1 1
This is code-golf so answers will be scored in bytes with less bytes being better.
[-2, 100, -2, -1]
, for example. \$\endgroup\$