What is desired is to
def accumulator():
def addition():
something here
and others
return addition
where
A = accumulator()
A(10)
10
A(10)
20
using Message Passing such that every accumulator() will have the overall sum at the end.
I have no idea how to start. . . I would be really appreciative if you could help! Thanks