Element.prototype.ftTransformedPoint and Element.prototype.ftUpdateTransform you may be able to spot some ideas. I don't think this is necessarily the best way (I wanted to do it just with matrices rather than the strings), but it may give some pointers.
Ianvar gCircle = s.circle(100,100,25).attr({fill:'green'});
var bCircle = s.circle(100,100,25).attr({fill:'black'});
var rCircle = s.circle(100,100,25).attr({fill:'red'});
var t10 = 't10,10';
var t50 = 't50,50';
var tChain = '';
for ( var i=0; i<5; i++ ) {
tChain += t10;
}
// tChain = 't10,10t10,10t10,10t10,10t10,10'
gCircle.transform( t10 ); // result, matrix(1,0,0,1,10,10)
bCircle.transform( t50 ); // result, matrix(1,0,0,1,50,50)
rCircle.transform( tChain ); // result, matrix(1,0,0,1,50,50)