fork download
  1. sucessor = lambda x: x+1
  2. antecessor = lambda x: x-1
  3.  
  4. def sum(x, y):
  5. if not y:
  6. return x
  7. return sum(sucessor(x), antecessor(y))
  8.  
  9. print(sum(3, 5)) # 8
Success #stdin #stdout 0.04s 9340KB
stdin
Standard input is empty
stdout
8