fork download
  1. class A(object):
  2. def __init__(self):
  3. self.__value = 0
  4. def b(self, n):
  5. self.__value += n
  6. return self.__value
  7.  
  8. a = A()
  9. for x in map(lambda i: a.b(i), range(10)):
  10. print(x)
Success #stdin #stdout 0.03s 9440KB
stdin
Standard input is empty
stdout
0
1
3
6
10
15
21
28
36
45