def adder(): n = 0 def add(): nonlocal n n += 1 return n return add