Implement trampoline for mutually recursive functions