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
This doesn't work because the caller of the third call to stage was given as this Execution, and thus that partially-applied stage remains on the stack after we branch ourselves. stage then attempts to return to us, when really we want it to return to our new branch. So, no looping occurs.
Possible solution: current branch[] becomes clone[], and new branch[] clones the caller and advances the clone.
Rather than the old-style of branch[] which essentially does stage(clone, caller); stage(caller, clone), I suggest one that has an explicit one to give to the clone. Not sure what this would look like though.
So, that solution from last night: definitely won't work. Two reasons:
not very friendly to abstraction; basically have to directly call branch, can't abstract that shit away
basically can't do anything that needs to consume stuff after the branch call, for similar reasons
I've realized it's irrelevant anyway. Turns out, this isn't a deficiency of branch, it's definitely specific to this use of stage. I'm pretty sure this can be solved with an extremely simple abstraction, anyway.
This doesn't work because the caller of the third call to
stage
was given as this Execution, and thus that partially-appliedstage
remains on the stack after we branch ourselves.stage
then attempts to return to us, when really we want it to return to our new branch. So, no looping occurs.The text was updated successfully, but these errors were encountered: