Manual tail-call optimization