Question: create group from procedure

I am working with a procedure and i just want to put the outputted elements into a group, how do i go about doing this e.g. > restart: > P := proc(L::list, V::listlist) > local S,t,x,y; > for S in combinat[powerset]([$1..nops(L)]) do > if S = {} then next end if; > print(add(L[t],t=S)) > end do > end proc: > with(ListTools): > P([a,b,c],[[1,0,0],[0,1,0],[0,0,1]]); 0 a b a + b c a + c b + c a + b + c I now want to stick all these values into a group, thank you in advance
Please Wait...