class A(object):
    def __init__(self):
        self.__value = 0
    def b(self, n):
        self.__value += n
        return self.__value

a = A()
for x in map(lambda i: a.b(i), range(10)):
    print(x)