I’ve posted an alternative method: Prolog: Compress a list that contains segments of continuous numbers to a list which contains list of range of segments [start,end] - Stack Overflow
… which uses Push-back lists on DCG rule heads
I’ve posted an alternative method: Prolog: Compress a list that contains segments of continuous numbers to a list which contains list of range of segments [start,end] - Stack Overflow
… which uses Push-back lists on DCG rule heads