MR K P SCHUPKE wrote:
>> | otherwise = contractSet (contract x0 y0:xs) ys > >I think you'll find the original is correct. The first two cases deal with >non-overlapping ranges. The only remaining case is overlapping ranges, >(partial and full overlap) both these cases are dealt with by contract, >and as a result use up both the ranges at the head of both lists, sdo >the merged range is prepended to the output list and the tail is >calculated by passing the unused tails of both lists to contactSet...
Consider the case of merging [(1,2),(3,4)] and [(1,4)]. I think your function will produce an answer of [(1,4),(3,4)].
-- Ben
_______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
