function splice(a,b)

alpha = Rot(Onext(a));
beta = Rot(Onext(b));

ta = Onext(a);
tb = Onext(b);

set_Onext(a,tb);
set_Onext(b,ta);

ta = Onext(alpha);
tb = Onext(beta);

set_Onext(alpha,tb);
set_Onext(beta,ta);


%void splice(edge_ref a, edge_ref b)
%  {
%    edge_ref ta, tb;
%    edge_ref alpha = ROT(ONEXT(a));
%    edge_ref beta = ROT(ONEXT(b));

%    ta = ONEXT(a);
%    tb = ONEXT(b);
%    ONEXT(a) = tb;
%    ONEXT(b) = ta;
%    ta = ONEXT(alpha);
%    tb = ONEXT(beta);
%    ONEXT(alpha) = tb;
%    ONEXT(beta) = ta;    
%  }
