west01
Programmer
- Mar 5, 2008
- 1
Hi to all,
I need a help...
I want to regroup a sorted list in a list of lists.
I would like to regroup all the same elements in a sorted list.
Examples:
?- regroup([1,1,2,2,3,4], L).
L = [[1,1], [2,2], [3], [4]];
NO
?- regroup([1,2,3,4], L).
L = [[1], [2], [3], [4]];
NO
Thank you for your help.
I need a help...
I want to regroup a sorted list in a list of lists.
I would like to regroup all the same elements in a sorted list.
Examples:
?- regroup([1,1,2,2,3,4], L).
L = [[1,1], [2,2], [3], [4]];
NO
?- regroup([1,2,3,4], L).
L = [[1], [2], [3], [4]];
NO
Thank you for your help.