Closed izgzhen closed 6 years ago
The inner set_arg
function is appended to the list of operations to perform. Each operation must be a function that accepts a stack of values as input. Operations are allowed to manipulate the stack. This operation happens not to manipulate the stack, but if you remove the argument the code will crash because a stack will be passed by the caller.
This might be clearer if we had type annotations in the evaluation module (see #50).
https://github.com/CozySynthesizer/cozy/blob/eb650f36dd16c5170a126761ba504c0072e454a4/cozy/evaluation.py#L597 this closure has an argument
stk
but not using it