This is from a past programming contest
Implement a class Chain that when called a number of times in a chain with numeric inputs, returns the sum of them.
>>> Chain(1)(2)(3)
6
>>> Chain(10) == 10
True
The thing is that in the first example the first call should return a number (i.e. 1), which is not callable. So how can the chain continue evaluating?