Question: List - position of repeated elements

Hello

I am working my way back to use Maple for some calculations I did in the past.   ListTools seems to have some of the functions I need but I couldn't find anything that gives me the position of all groups of repeated elements in a list of a list.  For instance, ListTools:~MakeUnique removes the copies of all repeated elements but it seems that there is no counterpart function that gives the position of the repeated elements, is there?

Search and SearchAll return position but they seem to be the only ones.  

Example:

a:=[[x+y+z],[2*x+y+z],[x-y+z],[2*x+y+z]];

and the expected output would be

pos:=[[1],[2,4],[3]];

Many thanks

Ed

 

Please Wait...