js-slang
js-slang copied to clipboard
Tracer: Stepper Produces Long, Hard-to-Read Trace for Higher-Order Recursion Function
Consider this following snippet:
function h(f, x) {
function h(g, x) {
return x <= 1 ? 1 : 3 * g(f, x - 1);
}
return x <= 1 ? 1 : 2 * f(h, x - 1);
}
h(h, 5);
The reasonable explanation for this step should be 1 <= 1 ? 1 : 2 * h(h, 1 - 1)) returned.