int GListDepth(GList ls)
/* Return the depth of list */
{
GList pp;
int max, h, t;
if(!ls)
return 1;
if(ls->tag == ATOM)
return 0;
for(pp=ls; pp; pp=pp->un.ptr.tp){
h = GListDepth(pp->un.ptr.hp)+1;
t = GListDepth(pp->un.ptr.tp);
if(h > t)
return h;
else
return t;
}
}