js-slang
js-slang copied to clipboard
Stepper: renaming happening without reason, leading to bug
https://share.sourceacademy.org/2vmmx
function rev(xs, result) {
draw_data(xs, result);
return is_null(xs)
? result
: rev(tail(xs), pair(head(xs), result));
}
function reverse(xs) {
return rev(xs, null);
}
reverse(list(1, 2, 3, 4));
gives:
with both rev and reverse renamed to reverse_1.
This problem is resolved in the new stepper.
https://github.com/user-attachments/assets/cab348f0-efd6-47cf-bcc2-ea965d69475b
resolved by #1742