4 ms·Because the cost() function OP posted isn't doing tail calls and can't be converted into tail call form.by mwkaufma 8y agoBecause the cost() function OP posted isn't doing tail calls and can't be converted into tail call form.mcguire 8y agoNot with that kind of attitude. :-) Converting to continuation passing does result in tail calls.mwkaufma 8y agoIs there an equivalent of call/cc in Python?mcguire 8y agoNo, you have to do it manually. I suppose you could write a code-transformer.