Best afterFunctions: package an idea you can call

Parameters: order matters

When you call a function, the arguments fill its parameters by position, left to right. Get the order wrong and the function computes something else entirely — here, a negative amount of money 'left'. Watch the call stack bind the parameters.

We have a budget of 100 and have spent 30. Work out how much is left (we want 70).

Arguments in the wrong order execution-derived · CPython
3 
variables
state after line 1 runs· pass 1 of 2
variablevalue
remaining<function remaining>coerced
step 1 / 5

Click a line, drag the slider, or use the keys.

What you are looking at

Watch the function's frame open: which parameter gets which value?

Every state you see came from running the program under CPython's tracer at build time — see how GlassBox stays honest.