12 lines
388 B
Text
12 lines
388 B
Text
cdp(v)={
|
|
my(s="");
|
|
v=apply(t->Vec(t),v);
|
|
for(i=1,vecmin(apply(length,v)),
|
|
for(j=2,#v,
|
|
if(v[j][i]!=v[1][i],return(s)));
|
|
if(i>1&v[1][i]=="/",s=concat(vecextract(v[1],1<<(i-1)-1))
|
|
)
|
|
);
|
|
if(vecmax(apply(length,v))==vecmin(apply(length,v)),concat(v[1]),s)
|
|
};
|
|
cdp(["/home/user1/tmp/coverage/test","/home/user1/tmp/covert/operator","/home/user1/tmp/coven/members"])
|