Works across functions and generates simpler and faster code than #701. Works even across files when used in conjunction with `runtime` option. Closes #256.
18 lines
283 B
JavaScript
18 lines
283 B
JavaScript
"use strict";
|
|
|
|
function f(n) {
|
|
if (n <= 0) {
|
|
return "foo";
|
|
} else {
|
|
return to5Runtime.tailCall(g, [n - 1]);
|
|
}
|
|
}
|
|
|
|
function g(n) {
|
|
if (n <= 0) {
|
|
return "goo";
|
|
} else {
|
|
return to5Runtime.tailCall(f, [n - 1]);
|
|
}
|
|
}
|