From
your description and sample solution, it is not at all clear what the function should return when the subtended set is not a range of contiguous integers. I.e., given your value of
@F, what should
range(1,8) return?
(1,2,4,8) or
(1,2,3,4,5,6,7,8) ?
Also, what guarantees will there be, regarding the orderedness and uniqueness of the elements of
@F ?
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.