fork download
  1. def add(x, y):
  2. return x + y
  3.  
  4. def sub(x, y):
  5. return x - y
  6.  
  7. def apply(f, *args):
  8. return f(*args)
  9.  
  10. print(apply(apply, apply, apply, add, 1, 2))
  11. print(apply(apply, apply, sub, 11, 2))
Success #stdin #stdout 0.1s 8856KB
stdin
Standard input is empty
stdout
3
9