michaelzinn
11/03/2017, 9:33 AM5
0
ENTER
it sets the number state to 5, then it multiplies the number by ten and adds 0 to it, then it pushes the 50 onto the stack and resets the number state to 0… The immutable calculator state object would include a stack and a number. That state would “mutate” like in your example code.