You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
Here, the two h in h(h(5 - 1)) refer to different values:
The fact that they are different becomes clear here:
Note that only one of the h are highlighted as being substituted.
The stepper should make clear that the two h are different by appropriately renaming one of them.
(This is called alpha-renaming, and already done properly for other cases.)
The text was updated successfully, but these errors were encountered:
The stepper doesn't distinguish variables properly when they are already referring to functions:
https://share.sourceacademy.org/svqdz
Here, the two
h
inh(h(5 - 1))
refer to different values:The fact that they are different becomes clear here:
Note that only one of the
h
are highlighted as being substituted.The stepper should make clear that the two
h
are different by appropriately renaming one of them.(This is called alpha-renaming, and already done properly for other cases.)
The text was updated successfully, but these errors were encountered: