tail-call optimization for str % tuple