You are defining TWO functions. When you call
f = maker(2)
you're defining a function that returns twice the number, so
f(2) --> 4
f(3) --> 6
Then, you define ANOTHER DIFFERENT FUNCTION
g = maker(3)
that return three times the number
g(3) ---> 9
But they are TWO different functions, it's not the same function referenced, each one it's a independent one. Even in the scope inside the function 'maker' are called the same, is't not the same function, each time you call maker()
you're defining a different function. It's like a local variable, each time you call the function takes the same name, but can contain different values.
In this case, the variable 'action' contains a function (which can be different)