Given a list of integers, there are no duplicate elements in the list.
You need to write a function compress(list) that converts this list into a string,
collapsing consecutive numbers in the sequence into ranges.
Given a list of integers, there are no duplicate elements in the list.
You need to write a function compress(list) that converts this list into a string,
collapsing consecutive numbers in the sequence into ranges.