Open devyn opened 10 years ago
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:
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.