def recursive_rowfunc(t, stop):
 funcs = []
 while (not t.isidentical(stop)):
  funcs.append(rowfunc(t))
  t = child(t)
 return compose(*funcs)

def recursive_rowfunc ( t , stop ) : funcs = [ ] while ( not t . isidentical ( stop ) ) : funcs . append ( rowfunc ( t ) ) t = child ( t ) return compose ( * funcs )
compose rowfunc functions up a tree .